Chmod 777 to a folder and all contents [duplicate]

2019-01-12 12:58发布

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.

7条回答
男人必须洒脱
2楼-- · 2019-01-12 14:02

Yes, very right that the -R option in chmod command makes the files/sub-directories under the given directory will get 777 permission. But generally its not a good practice to give 777 to all files and dirs as it can lead to data insecurity. Try to be very specific on giving the all rights to all files and directories. And to answer your question:

chmod -R 777 your_directory_name

... will work

查看更多
登录 后发表回答