• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

alternate to chmod 777

W

webgurl

Guest
This may be more of a *nix or apache question than just a plesk thing. I'm installing zencart and in the install it requires a whole bunch of folders to have their permissions changed to chmod 777. I usually avoid any scripts that require these permissions since it leaves you open to hackers. I know there must be a way to install these scripts without changing the permssions to 777.

If someone could point me in the right direction (a link, how to, a book) I would greatly appreciate it. So far I'm thinking I should be able to allow access to these folders to my admin users (chown) however I am stuck on how to implement it. Do I need to setup an htaccess file for these directories?

I'll continue investigating, but I'm hoping someone can speed up my research time with some useful resources or tips on how to implement this.

Thanks
 
You can use setgid on directory with specific ownership.groupownership of directory. (chmod 2775).

Good luck.
 
Have you tested this script to make sure it actually 'needs' the folder chmodded to 777? Sometimes script writers default to this in their documentation when actually it only needs to be 666 766 776 or something else less risky. Most of the time these scripts want to write to a folder but don't always need full permissions to it.
 
Alot of times you can just do this for web based application installers:
# chgrp apache /path/to/folder
# chmod 775 /path/to/folder
 
That would be bad to remove the psacln group because then modules such as backup wouldn't be able to control the files.
 
Currently I get an error in PHP that I can't write to a file. This is how my permissions are setup for the file:

-rwxrwxr-x 1 user psacln 20081 date file.php

I thought if I allowed write access to the group it would allow the php file to be written. What am I missing here?
 
Back
Top