I am using some webpages in my remote server(RHEL 8) and the directory is var/www/html/project
. In the project files I have a charts
folder and the .js files inside that folder will be update time to time.
So I am always make permissions for that directory files to be what I wanted. I need to find a method to make the default permission as 777 for all these files.
So my target directory is var/www/html/project/charts
and I need to set any files(even though it deleted and recreated inside) with the permission to read,write and execute by anyone?
As an example I need to make this directory as default permission as 777. Is this possible?
chmod 777 var/www/html/project/charts/
I have found answers there. But I am confused where to add 777. How to set default file permissions for all folders/files in a directory?
suExec
for Apache2 or a similar mechanism if your webserver is nginx.setfacl
, and instead you have to spell the permissions out. (Partly because ACL entries come separately for users and groups, not in one single block.)setfacl -d -m u::rwx,g::rwx,o::rwx dir
should do to set the default ACL to what basically amounts to0777
. But that will still be modified by the permissions given in theopen()
system call, so you probably get e.g.0666
for text files etc. And maybe you should leave the write permission off for "others"