You are here

There is a function that authorized web users to manage (Write/Delete) certain folders and files through webpage. Now that function is not working due to user is not authorized to “tomcat”/"apache".

Some web programs allow user to upload files to web server. Web account is needed to grant with right/permission for web server to upload files. You can use the following command to set the permission so that files can be uploaded to the <path> in the web server (either apache or tomcat) and you still have enough permission to delete/modify the uploaded file.

PHP case:
chmod 771 <path>   
setfacl -R -m d:u:<account>:rwx <path>
setfacl -R -m u:<account>:rwx  <path>
setfacl -R -m d:u:apache:rwx  <path>
setfacl -R -m u:apache:rwx  <path>
setfacl -R -m d:g:<account>:rwx <path>
setfacl -R -m g:<account>:rwx  <path>
setfacl -R -m d:g:apache:rwx  <path>
setfacl -R -m g:apache:rwx  <path>

Tomcat:
chmod 771 <path>   
setfacl -R -m d:u:<account>:rwx <path>
setfacl -R -m u:<account>:rwx  <path>
setfacl -R -m d:u:tomcat:rwx  <path>
setfacl -R -m u:tomcat:rwx  <path>
setfacl -R -m d:g:<account>:rwx <path>
setfacl -R -m g:<account>:rwx  <path>
setfacl -R -m d:g:tomcat:rwx  <path>
setfacl -R -m g:tomcat:rwx  <path>

Service Category: