Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
files permission problem chmod()
#1
Hi everyone,
I have installed GS on my local pc and done everything I need and connect it to my design but after I uploading the files (as a .zip through the cpanel) I couldn't edit anything (pages or setting) both through errors.

health-check seems good, everything green even the chmod check.

After some search here I changed all the XML files chmod (Using the cPanel File Manager) to 777.
And all the folders to 775, now I can edit the pages but I cant upload any image!
It use to though errors but it doesn't anymore, maybe because I changed some of the files chmod. Also Im using the "imagizer" plugin but when I click on it I just get this error

Quote:Catchable fatal error: Argument 1 passed to save_config() must be an instance of SimpleXMLExtended, instance of stdClass given, called in /home/tester/public_html/gs/plugins/Imagizer.php on line 117 and defined in /home/tester/public_html/gs/plugins/Imagizer.php on line 122

(even if i disable it, i cant upload.)


Finally I tried to install a fresh one 3.3.1, but when I go to admin to install it I get heaps of this 2 errors for different files

Quote:Warning: chmod() [function.chmod]: Operation not permitted in /home/tester/public_html/test/gs/admin/install.php on line 42

Quote:Warning: copy(/home/tester/public_html/test/gs/data/tmp.tmp) [function.copy]: failed to open stream: Permission denied in /home/tester/public_html/test/gs/admin/install.php on line 43

I dont know what are a good/safe chmod i should use for each files. or if there is something wrong or need to be changed in the server? what is it? I have tried everything with the fresh installation, setting everything to 777 makes some of the errors disappear
Reply
#2
The problem is that on your server the user who is running PHP is not the same as the FTP user. In this case calling chmod() (and some other operations) will always fail on files uploaded via FTP (and give a warning). Files have to have 0666 to be writable, folders need 0777 to be writable and executable. Giving the image folder 0777 might make the image upload work.

I don't know if GetSimple generally is not designed for working on servers where the FTP user is not the PHP, but if it is so, you're likely going to have further problems.
Reply
#3
he did not ftp them he extracted them using cpanel, this has known issues.

Also php warnings do not usually indicate an actual problem as such they are warnings, we attempt to copy as 755 then chmod to 777 and copy again, so warnings are normal, of course its possible that chmod is not allowed at all on your
host.

If all else fails try to chown the files, or ftp them.

can also try to enable gssuppresserrors or turn off php error reporting
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
shawn_a Wrote:he did not ftp them he extracted them using cpanel, this has known issues.
Oops, I should have read more carefully.

shawn_a Wrote:Also php warnings do not usually indicate an actual problem as such they are warnings, we attempt to copy as 755 then chmod to 777 and copy again, so warnings are normal, of course its possible that chmod is not allowed at all on your host.
Regarding admin/install.php line 39ff: wouldn't it be possible to avoid the copying and check the return value of chmod() instead? (That would not suppress the warnings, though.)
Reply
#5
I am sure the process can be improved, but honestly we do not get these reports often.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 2 Guest(s)