Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chmod 777 to a folder and all contents [duplicate]

I have a web directory /www and a folder in that directory called store.

Within store are several files and folders. I want to give the folder store and all files and folders within the store folder all permissions.

How do I do this? I am guessing via .htaccess.

like image 734
RSM Avatar asked Nov 30 '11 15:11

RSM


People also ask

What does chmod 777 do to a directory?

Setting 777 permissions to a file or directory means that it will be readable, writable and executable by all users and may pose a huge security risk.

How do you make chmod 777 all var www subfolders?

If you are going for a console command it would be: chmod -R 777 /www/store . The -R (or --recursive ) options make it recursive.

What the problem is if we chmod 777 for all the files?

The problem is that if someone can penetrate your system as a user other than yourself, if your files are CHMOD 777, they can read, write, execute and delete them. This is considered a security threat.

What does chmod 777 R mean?

The command chmod -R 777 / makes every single file on the system under / (root) have -rwxrwxrwx permissions. This is equivalent to allowing ALL users read/write/execute permissions. If other directories such as home, media, etc are under root then those will be affected as well.


1 Answers

If you are going for a console command it would be:

chmod -R 777 /www/store. The -R (or --recursive) options make it recursive.

Or if you want to make all the files in the current directory have all permissions type:

chmod -R 777 ./

If you need more info about chmod command see: File permission

like image 138
petervaz Avatar answered Sep 27 '22 22:09

petervaz