Goutham
asked on
directory and file ownership and permission getting changed in linux
Dear Experts
Sugacrm application which of LAMP stack running on centos 7.8 , the document root is /var/www/html/sugarapp
#chown apache:apache -R sugarapp
#chmod R 2775 sugarapp
Then under sugarapp
Please help me with permanent fix for the above issue,
not sure why sub directories and files of document root directory “sugarapp” is not inheriting the ownership and permissions from it (parent directory) to all its sub direcotires and files (existing and newly going to get created) Please help me with correct chown or chmod if above is found to the incorrect so that owner ship and permission remains unchanged and gets applied to under it for any new files/directories
Sugacrm application which of LAMP stack running on centos 7.8 , the document root is /var/www/html/sugarapp
#chown apache:apache -R sugarapp
#chmod R 2775 sugarapp
Then under sugarapp
- chown -R www:www *
- chmod -R 2775 ./cache/
- chmod -R 2775 ./custom/
- chmod -R 2775 ./data/
- chmod -R 2775 //modules/
Please help me with permanent fix for the above issue,
not sure why sub directories and files of document root directory “sugarapp” is not inheriting the ownership and permissions from it (parent directory) to all its sub direcotires and files (existing and newly going to get created) Please help me with correct chown or chmod if above is found to the incorrect so that owner ship and permission remains unchanged and gets applied to under it for any new files/directories
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No way to really answer your question without far more data, like every step of how files get created/changed, then see the exact system or other ACLs affixed to files.
ASKER
Sir, thanks for the inputs,
able to execute all the commands under
cd .../sugarapp
but when executed setfacl ( distro is centos hence www) below is the message,
#setfacl -Rm d:u:www:rwX,u:www:rwX
setfacl -Rm d:u:www:rwX,u:www:rwXUsage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...Try `setfacl --help' for more information.You have new mail in /var/spool/mail/root
able to execute all the commands under
cd .../sugarapp
but when executed setfacl ( distro is centos hence www) below is the message,
#setfacl -Rm d:u:www:rwX,u:www:rwX
setfacl -Rm d:u:www:rwX,u:www:rwXUsage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...Try `setfacl --help' for more information.You have new mail in /var/spool/mail/root
ASKER
sorry please ignore the previous, I have to execute this outside the app like below and this worked, thanks.
# setfacl -Rm d:u:www:rwX,u:www:rwX sugarapp
# setfacl -Rm d:u:www:rwX,u:www:rwX sugarapp
Perfect!
Glad you got this working!
Glad you got this working!
ASKER