Roshan Book

My Tech Notebook

Chmod to allow read and write permissions for directory


Source: http://superuser.com/questions/126073/chmod-to-allow-read-and-write-permissions-for-directory

For all users to have read and write access, that would be 0777 which is a bit dangerous, especially if you are running a webserver. Like @unwind said:

chmod -R 0777 /mydirectory Will allow all users read and write access to all files and folders within that directory

Depending on your purpose, you may want to read about sticky bits, which allow all users to create new files, but not to delete or edit other files in a directory:

chmod +t /mydirectory

Also, in case you didn’t know man chmod will bring up the manual page for the chmod command, which you can search for the text “recursive” by typing /recursive

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: