Skip to main content Help Control Panel

Login   A+   A-

Community «   Discussion forum «   Installation support «  

Chmod errors

Deroy, Tony -- on Mar. 20 2005
Program generated files create errors due to improper chmod
I am on a hsphere server and I get this kind of error all the time. To bypass this problem with the auto update, I had to delete all the system generated folders then manually create them and chmod to 777.

The problem below is similar. . . to fix this I had to first delete the category dir, then manually create it, chmod 777 - re-upload the image and get the message below, then I had to delete the 8 dir, manually create it, chmod 777, then it worked.

Any ideas?

Thanks,

Tony

Warning: move_uploaded_file(/hsphere/local/home/hairrout/hairroute.com/yacks/images/category/8/news.png): failed to open stream: Permission denied in /hsphere/local/home/hairrout/hairroute.com/yacks/images/edit.php on line 260

Warning: move_uploaded_file(): Unable to move '/hsphere/local/home/hairrout/tmp/phpRRQVIK' to '/hsphere/local/home/hairrout/hairroute.com/yacks/images/category/8/news.png' in /hsphere/local/home/hairrout/hairroute.com/yacks/images/edit.php on line 260
Bernard
avatar
from nearby-an-airport
Associate, 6796 posts

on Mar. 20 2005


YACS works correctly if the account that runs the web server is the directory/file owner, or is in the group that is explicitly allowed by the 775 setting.

If you are using the user account 'a' to to things manually, and if the web server is based on account 'b', then:
  • list the group 'g' that has granted rights to directories and fiels (use the 'll' command)
  • ensure that 'b' is in 'g'


Send me some feed-back on this. I will check this with a Linux specialist on Monday if necessary
Tony
8 posts

inspired from Bernard on Mar. 20 2005


Bernard,

That was so far over my head that I can't even see it!

When I look at the folders/files using the web shell, I see that the part of the file description when I ftp or create folders/files in web shell have an description of hairout:hairrout and when the program creates a file it is httpd:httpd. . . and I can see it, read it, but can't change it so I guess it is being created with file permissions that I can't use as well as the program.

I have a reseller account and hairroute.com is one of several 'sites' hosted under this account. I will send my question and your reply to my provider and see what he has to say.

I will get back to you, thanks.

Tony
Tony
8 posts

inspired from Tony on Mar. 20 2005


Tony: This is the response by my server tech. . .

More info I gave him was. . . "I still get the error. . . when trying to upload a photo using the system for example, it says

The script whose uid is 1151 is not allowed to access /hsphere/local/home/hairrout/hairroute.com/yacks/images/article owned by uid 1124"

Your support request was answered:

Created: Mar 20, 2005 12:59:21 PM Last Mod: Mar 20, 2005 4:14:59 PM

Assigned To: Kris Simms(Kris Simms)

[Mar 20, 2005 4:17:20 PM] A: I would ask the yacks developers if this script runs under php safe-mode and if so have them install it for you. I do not understand what a,b,g means in there responce

http://ca.php.net/features.safe-mode
Bernard
avatar
from nearby-an-airport
Associate, 6796 posts

inspired from Tony on Mar. 20 2005


Tony: Does you ISP requires that PHP runs in Safe mode?

You can check this from within YACS. At the Control Panel, click on the 'info' link below the page title. On the next page select 'PhpInfo'. A bunch of things should be displayed. Search for the parameter safe_mode. If the value is Off or O, your server is not running in safe mode. Else it requires the safe mode.
Tony
8 posts

inspired from Bernard on Mar. 20 2005


Bernard,

Yes. . .

safe_mode ON

safe_mode_exec_dir /hsphere/local/home/hairrout/hairoute.com

safe_mode_gid off

Now what?
Bernard
avatar
from nearby-an-airport
Associate, 6796 posts

on Mar. 20 2005


Tony: Now we are in trouble, since I have never run YACS in safe mode... Despite the several installations of YACS world-wide, you are the first one to report on such a thing. shit

Please let me a couple of days to see if I can setup a server running in safe mode, and to evaluate the impact on YACS operation.
Tony
8 posts

inspired from Bernard on Mar. 20 2005


Bernard,

I will also ask my provider why it is on safe mode?? Maybe they will turn it off
Bernard
avatar
from nearby-an-airport
Associate, 6796 posts

inspired from Tony on Mar. 20 2005


Tony: Please do. And let me know if your ISP can change its settings, this would save me a lot of time...
Tony
8 posts

inspired from Bernard on Mar. 21 2005


Bernard,

I have sent a note asking why the safe mode but I suspect it has to do with the referenced document he sent me. . . http://ca.php.net/features.safe-mode

Anyway, to speed things up and keep the conversation at the same tech level, maybe you would consider emailing him directly?

Kris Simms mysupport@support1.net

Maybe you guys can work something out. . .

It will take some time for me to get the hang of yacs and get the full bennefit, but so far I like the way if functions and the awsome potential for the future.

Thanks for you help and very timely support.

Tony
Tony
8 posts

inspired from Bernard on Mar. 22 2005


Bernard,

Any luck with this?

Tony
Bernard
avatar
from nearby-an-airport
Associate, 6796 posts

on Mar. 22 2005


Tony: According to the manual:

"The PHP safe mode is an attempt to solve the shared-server security problem. It is architecturally incorrect to try to solve this problem at the PHP level, but since the alternatives at the web server and OS levels aren't very realistic, many people, especially ISP's, use safe mode for now."

Unfortunately, many ISP are still using PHP in safe mode even if better solution exist today.

My problem today is that I have to evaluate precisely all limitations induced on YACS by the safe mode.

One big issue is that YACS handles many files by himself: files uploaded by users, configuration parameters, and even PHP scripts.

At the moment I am not sure if YACS is even compatible with the safe mode.

Please allow me some time to investigate these complex topics.

I can tell you, all ISPs are not born equal...

My own ISP http://www.ovh.com/ is doing things properly and YACS works there from the outset, without any additional chmod...

Please understand that your issue is actually due to the lazy way your ISP has setup things, and that some time will be necessary to find a workaround, if one exists.

Sorry for inconvenience, if any.
Tony
8 posts

inspired from Bernard on Mar. 24 2005


Bernard:

I sent along this link to my isp hoping that it might help. As you will note below, they are going to try it out - but I don't know if it will fix yacs or not, but I hope so.

Will keep you informed.

Tony

http://www.titov.net/safemodepatch/

[Mar 23, 2005 5:57:13 PM] A: We will be testing this on the server you are on tomorrow. I like what it does. Thanks
Bernard
avatar
from nearby-an-airport
Associate, 6796 posts

inspired from Tony on Mar. 24 2005


Tony: I am crossing fingers, just in case...

Rate this page
Posted by Tony on Mar. 20 2005, commented by Bernard on Mar. 20 2005, (popular)