Permanently changing the access rights to the picture folder


#1

how do i permanently change the access rights to the picture folder. i want to be able to delete pictures vie explorer and its a pain settting the rights all the time.


#2

ssh into beagle bone black, then

$ cd /picture/folder
% sudo chown 777

I believe that should work?


#3

No, that won’t work. If you used “chmod,” then the 777 would be changing the permissions to allow read, write and execution for something…but you haven’t said what. You would not use “chown” with octal values like “777”. (EDIT: Actually, you could…but it’s a bit less clear than the example I give below.)

If the path is as Roy indicated and the directory is named “folder”, then you do this:

  1. Move to the parent folder, which is the next folder up in the tree (i.e.; into the “picture” folder)
    $ cd … (NOTE: There is a space between “cd” and “…”)

  2. Now it’s a good idea to check the ownership/permissions:
    $ ls -l

  3. Now you simply change the ownership of everything in the “folder” directory to your user name. So for me (user ‘tb’) it would be this:
    $ sudo chown -R tb folder/

The last line there does a few things:
a) Grants ROOT privileges
b) CHanges OWNership of the directory
c) Marches down the file tree and Recursively applies the changes
d) Changes ownership of all the files in the “folder” directory, to the user ‘tb’

  1. Finally, confirm that your user now owns the files.
    $ ls -l (NOTE: You should now see your username as being the owner)

  2. As a side note, you can also change the group in a similar fashion. In step three, simply use chgrp in place of chown, and the group will get changed to “tb” in this case. Changing ownership should be enough to fix the issue seen by the OP, so this step wouldn’t be necessary–however I include it for completeness.

Obviously you must adjust these commands for your user name, and your specific directory structure. Finally, don’t forget about the Linux “Manual” pages. They are an online help system available on many of the shell commands.

$ man chown


#4

Thank you the individual file right change was what i had been doing, so every new picture would need the same process before i could delete it.

I will try the folder suggestion from tcbetka it looks like that schould work. thx i will let you know how it works.


#5

If you are interested in learning more about Linux in general, check out this guy (TheUrbanPenguin) on YouTube. Been watching his stuff for a while now–and he’s GREAT.

Here’s a tutorial on the issue discussed in this thread:

Linux File Permissions tutorial


#6

Thank you your fix worked perfectrly i now have it as a standard nettwork folder and deleting copying etc is point and click.


#7

There you go…

Glad it worked out for you.

TB