I have Ubuntu Server running and I am setting up a separate directory as a cgi-bin. I have the directory ready and I changed the file for the site. However, to get it to work, I need to change the permissions of the Python script I have in the folder so that Apache can execute it. However, I don't want to give write or execute access to ANYONE other than root, me and Apache. I'm assuming this is possible, but how can it be done?
Linux – How to give execute permissions to Apache2 user and NOT to everyone else
apache-2.2cgilinuxUbuntuuser-permissions
Related Topic
- Apache CGI Script Can Cannot Overwrite a File in a Directory it has full permissions to
- Apache2 – How to setup the directory permissions of website folder
- Linux – suexec policy violation: What were these guys up to
- Linux Web Server – Proper Permissions for Website Files and Folders
- Ubuntu – How to give the Apache group write access to log files, and an FTP user read-only access
- Python – Apache: permission error while opening file
- SFTP and Apache – Grant Write Permissions on Same Folders
Best Answer
chown
the files to whatever your Apache group is called (Usually www-data) and set permissions to only give user/group permissions:That sets it so only the www-data user and group can write the file, and only the www-data user can execute the file, everyone can read.