Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to recursively change the permissions of all folders, sub-folders and files from within ~/.local/share/Trash/expunged Does anyone have a clue or idea on how to do this?

enter image description here

I have tried following the instructions from this question but to no avail. chmod -R ug+rw <foldername> doesn't seem to be working for this folder, its subdirectories, or enclosed files.

enter image description here

Does anyone know the chmod command to change these permissions? For example:

root@santos:/home/santos/.local/share/Trash# ls -l
total 12
drwx------ 3 santos santos 4096 Mar 21 21:38 expunged
drwx------ 2 santos santos 4096 Mar 21 21:38 files
drwx------ 2 santos santos 4096 Mar 21 21:38 info
share|improve this question
up vote 5 down vote accepted

try by using numeric values

chmod -R 660 directorymainname
share|improve this answer
That will remove the execute bit from all directories in the specified tree, for all users, which will prevent anybody from entering the directories. – Eliah Kagan Jul 14 '12 at 14:58

From the screenshot it seems like the chmod command worked well. As you wrote chmod -R ug+rw it gave a read/write permission to the user and group of the recursive folders.

If you want to give everybody a read/write permission you should add 'a' to your command so that it will be chmod -R uga+rw.

share|improve this answer
Actually, o means "other users." a is short for ugo. uga+rw is equivalent to ugo+rw, but they're only equivalent when u and g are specified. – Eliah Kagan Jul 14 '12 at 14:59
actually "a" means "all" (which should be the default). the letter "o" is for "other". unless your referring to using the "o" in addition to another permission and not trying to define the ownership. – user118118 Jan 2 '13 at 6:36
thanks it works – Ankit Agrawal Mar 6 '14 at 5:43

protected by Community Jan 5 '13 at 9:23

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.