• 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

Permissions & user groups issue

K

krise

Guest
I am using Plesk 8.3 with linux on a dedicated server with PHP/MySQL/Apache. This is the basic directory structure.

<mydomain>/logs
<mydomain>/httpdocs
<mydomain>/src

The application is web based and therefore runs as apache user. There are also some cron jobs that update files used by the app. Currently I am just uploading the files and setting up crontab via SSH (done using ftp user 'sam' created thru Plesk therefore in psacln group). I have come across some permission problems because the cron user is different from the apache user. I need a solution to ftp files to my server and have apache and the cron jobs modify certain files such as the logs and some other files and avoid permission problems.

I am considering these options:

1. Have the apache user run the crons but by default apache user has 'nologin'. Is there any problem changing this? This might be the simplest solution. I would then also ftp the files as apache so everything is done by one user.

2. Create a new group 'mydomain' and add apache and sam to it. I would still have to periodically set the group permissions on the files (*).

3. Add sam, the user that sets the cronjob, to group psaserv. Unless this is the recommended way to do this I would prefer to go with 2. Is there any reason to add or not to add sam to psaserv?

(*) I have read and also tested that setgid doesnt work on linux and that umask only works for process that sets it (and child processes) and is global.

It seems like others should have faced this issue. It would be great to hear how others approach permissions issue with plesk? Please keep your responses specific to linux though to avoid confusion.
 
Back
Top