Home > Net >  Owner/group/permissions difficulties
Owner/group/permissions difficulties

Time:12-14

My script is running under the user, 'apache'.

It wants to write to two dirs on the same subdomain but permissions are denied. My ISP is taking an age and lots of 'attempts' to adjust the permissions but I expect it not to be as difficult as they are showing it to be.

The file trying to write is /cgi-bin/scripting/filename.pl with owner/group shown in Filezilla to be 'thechri psacln' and the permissions shown as adfrw(0755)

The file being written/created is within /dirName1/12345/graphics/ (usually .jpg/.gif)

/dirName1 shows owner/group is also 'thechri psacln' and permissions are flcdmpe (0775)

/dirName1/12345/ -> owner/group is 'thechri psacln' and permissions flcdmpe(0775)

/dirName1/12345/graphics -> owner/group is 'thechri psacln' and permissions are flcdmpe (0775)

/dirName1/12345/graphics/filename.jpg -> owner group is 'thechri psacln' and permissions are adfr (0664)

The error message says: Error: Unable to open directory [ /var/www/vhosts/domainname.com/subdomain.domainname.com/dirName1/12345/graphics ] Reason: Permission denied

my script also writes in a dir /upload/errors/error_log.txt. if permissions are correct.

/upload -> owner/group 'thechri psacln' permissions are flcdmpe (0775)
/upload/errors -> owner/group 'thechri psacln' permissions flcdmpe (02775) /upload/errors/error_log.txt -> owner/group 'thechri psacln' permissions adfrw(0664)

Is it possible that any of you may be able to advise me or point me to a tutorial that will help me get this resolved. It is my ISPs role to do this but time is of key importance so if I can manage to do it with your help, it would be a better way.

BTW, if I set permissions to 777, the writing does take place so I expect that proves it is not my scripts being at fault.

If you need any more information, please let me know.

CodePudding user response:

Put the user configured in httpd.conf (the user apache runs as) in 'psacln' group.

  • Related