How NOT to Require CHMOD 755 Permissions?

5 posts / 0 new
Last post
#1 Tue, 12/30/2008 - 13:54
=IceBurn=

How NOT to Require CHMOD 755 Permissions?

On my previous server and on some other hosts, I was able to write to files (for example with PHP) without having to chmod the files first.

Now I cannot, and files are required to be chmoded properly so I can write to them.

I cannot even touch() a file with PHP.

Is there any way to have this permissions removed?

I don't want to chmod the all thing, all I want is to change the configurations so I can fwrite() or file_put_contents() normally.

I's a dedicated un-managed server, so basically any advanced configurations can be done.

Please help!

Thank you in advance!<br><br>Post edited by: =IceBurn=, at: 2008/12/30 13:55

Tue, 12/30/2008 - 14:24
Joe
Joe's picture

You'll want to switch to suexec execution of PHP scripts.

--

Check out the forum guidelines!

Tue, 12/30/2008 - 14:30 (Reply to #2)
=IceBurn=

Hi Joe and thank you for your reply.

You mean I have run PHP as CGI?

Regards,
=IceBurn=

Tue, 12/30/2008 - 14:36 (Reply to #3)
andreychek

Howdy,

You can use suexec with CGI or FastCGI (the latter of which offers similar speed benefits to mod_php).

To change those settings for all new Virtual Servers, look in System Settings -&gt; Server Templates -&gt; Default Template -&gt; Apache Website.

To change it for an existing Virtual Server, look in Server Configuration -&gt; Website Options (choose &quot;Run CGI scripts as the domain owner&quot;).
-Eric

Tue, 12/30/2008 - 15:13 (Reply to #4)
=IceBurn=

Thank you for your reply!

Can you please verify if these settings are correct:

/etc/php5/cli/php.ini=Configuration for mod_php
/etc/php5/cli/php.ini=Configuration for scripts run via CGI
/etc/php5/cli/php.ini=Configuration for command-line scripts

I think they are not, can you point me in the right direction?

One more thing, if I chmod chmod -R ug+rw the users directory, will that be insecure? Is this a good work around?

Thank you very much for your help!

Topic locked