9

How can I change the permission (555 or 755) to a user in a specific folder in Ubuntu 12.04. I used this command, but it didn't work

sudo chown -R username:group directory

Thanks,

2
  • 5
    The details of your question are very ambiguous, but they matter a lot. Please explain as precisely as possible what you. What properties (location, ownership) and function(s) does the folder have? Apr 9, 2015 at 12:00
  • 1. Are there subdirectories and files in each folder? 2. Do you want to have the directories accessible to different users with different access attributes? This is an old question but can be made useful. Feb 21, 2020 at 17:18

1 Answer 1

11

If you want to change the permissions use this command (755 will grant the owner of the file read, write and execute permissions and read and execute permissions to group and other users ):

sudo chmod -R 755 directory

If you want to change ownership of a folder and it's subfolders and files

sudo chown -R username:usergroup directory

If the owner of a file or directory is let's say the user jofrey you want to grant him read and write permissions:

sudo chmod -R u+rw directory

You can learn more about permission numbers and what they mean from this image

Permissions

0

Not the answer you're looking for? Browse other questions tagged .