Php fpm permission requirements12/20/2023 With php-fpm, it’s the php processes that write to the data folders, and not nginx, so what matters for writable data directories is what uid php-fpm runs as - nginx won’t be writing to those, and it might not even be reading from them either - all nginx does is talk to the php-fpm socket. I prefer avoid an extermination strategy, that is, set php/nginx user to account user development and set all file/dir to development:development.Ī lot of the currently used uid/gids for apache/nginx/php are a bit of a mess, and changing them might actually break running instances, so we have to be really careful to attempt to fix it. I don’t see reason for php user to write to any file, read yes, execute I see no reason either. Maybe 660 rw for both owner:group is the maximum mode needed, but ask the question and a get a million different answers. For these I seem to expect 644 user rw, group r, public. I see no apparent reason for Public to have read or write or execute on any php file, script php code file or Symfony packages. When it comes to directories, it’s generally acknowledged that mode 755 is acceptable but files, is not so clear cut. There are no users assigned to group development and so after a Git it breaks many areas of my site and I have to change owner of everything back to httpd:httpDEV, royally annoying. Local user account is development and is the Git account.Įvery Git push/merge keeps changing the owner:group of every file/dir it touches from httpd:httpDEV to development:development. The other complications involve Git push/merging. It leads me to think there’s some other phantom user maybe nobody interfering, since nobody is not in group httpDEV (hence one requesting default nginx/php conf users info, maybe I need consider reset all user back to nobody. Maybe I need set owner to development and add user httpd to group development, but I struggle to come up with reason why this would work. Such as if postAdsMedia where development:httpDEV both rwx.ĭevelopment & httpd users are in httpDEV group. I cannot fathom why if the user httpd (php-fpm & nginx worker) is in the group httpDev which has rwx mode why it doesn’t have write access. Since nginx-mainline my php If postAdsMedia owner and group is anything other than httpd including if the group is httpDev (which user httpd is apart of) I get permissions error and cannot write to the directories. var/www/http/websitedomain/public/postAdsMedia A PDF invoice is created and saved to disk when the user finalises the posting process. I have a directory postAdsMedia it is used by Symfony Web App to allow users to Create an Ad with ability to upload Images & Video. Group httpDEV has users httpd & development I have system level user account development with ssh, sftp access. Then can try move on to other complications as I have insurmountable permissions confusion concerning owner:group file/dir mode on my system. One point to ask is, since Clear Linux doesn’t have Apache bundle, why is there a httpd user on the system if Nginx defaults to user nobody? Maybe some other bundle created user httpd? Php-fpm (is user nobody or httpd and the group is it nobody or httpd) usr/share/nginx-mainline/conf/ĭoes the top line or is there a line anywhere for:Īt this point trying to establish Clear Linux’s default Nginx-Mainline worker process user (is it nobody or httpd) usr/share/defaults/php/php-fpm.d/www.conf I have long standing continual permissions issues with my setup, Nginx-Mainline, PHP-FPM, & Github.įirstly, can someone be kind enough to paste some data from their default conf files here for me to compare to my setup.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |