+2 votes
in Operating Systems by (15.7k points)

I have many users on my VM and want to give them RW access to a folder so that they all can read and write to the files present in the folder. chmod 777 foldername did not work for me. Any idea?

1 Answer

+1 vote
by (15.3k points)

To give Read+Write access: sudo chmod -R a+rw foldername
To give Read+Write+Execute access: sudo chmod -R a+rwx foldername
-R, --recursive (change files and directories recursively).

Other options are as follows: (copied from man page of chmod)
       -c, --changes
              like verbose but report only when a change is made
       -f, --silent, --quiet
              suppress most error messages
       -v, --verbose
              output a diagnostic for every file processed
              do not treat '/' specially (the default)
              fail to operate recursively on '/'
              use RFILE's mode instead of MODE values
       -R, --recursive
              change files and directories recursively