Page 1 of 1

[SOLVED] Permissions / Perl CGI

Posted: 2010/09/07 14:48:37
by Bigus
Hi

I have a Plesk-controlled server set up running Apache and am having file premission issues.

That is, I've got a script that needs to create a new file in a directory that belongs to another domain. For example:

http://domain1.co.uk/cgi-bin/writefile.cgi

needs to write to:

/var/www/vhosts/domain2.co.uk/httpdocs/files

The permissions/owner/group on that directory are:

775 / doman2_user / psacln

I've tried adding the users 'domain1_user' and 'apache' to the psacln group (and restarting Apache) but I still get "permission denied" when trying to write the file.

Any ideas what I need to do to get this to work?

Thanks
Bigus

Re: Permissions / Perl CGI

Posted: 2010/09/07 16:03:00
by Bigus
Hmm, I've found a solution.

If I add domain1_user to the psaserv group it works.

I don't really understand *why* that works though. psaserv is the group on the httpdocs directory itself but the group at the level I want to write to is psacln, which I thought would override that.

Bigus

[SOLVED] Permissions / Perl CGI

Posted: 2010/09/08 17:26:02
by pschaff
Thanks for reporting your solution. Marking the thread [SOLVED] for posterity.