View Full Version : No uploads and a message
I can't upload pics and get this message when I try:
Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 6344/6344 is not allowed to access /mounted-storage/home8/sub003/sc15378-GJSN/www/photoplog/images/793 owned by uid/gid 99/99 in /mounted-storage/home8/sub003/sc15378-GJSN/www/photoplog/upload.php on line 143
I assume looking at the title that it's because SAFE MODE is on. I cannot change this as I don't have access to do so. A solution please?
K
I also ge tthis error in the middle of the page:
Sorry, ka$h: Bad Type
Part of the same I hope, but I could do with some help :(
K
Morgan
01-11-2006, 10:58 PM
Is the images directory set to 777 permissions? If so, and you still cannot upload, ask your host if they will change UID (user) checking to GID (group) checking so you can upload. Here's a link to safe_mode_gid (http://www.php.net/manual/en/features.safe-mode.php#ini.safe-mode-gid). It's something that needs to be set in the php.ini or httpd.conf file.
Content visible to registered users only.
Yeah, images is 777 and that's the probs I get. I can ask host to change that, I'll have to read that link throurghly now to see where this is going as it's losing me a bit now. All will be come clear soon I hope. Thanks so far mate ;)
Morgan
01-11-2006, 11:27 PM
Not sure if you saw it on that page, but if you look for the sentence that starts with "When safe_mode is on, PHP checks to see if the owner of..." there is some more talk about UID/GID stuff that may be of some help. Let me know how it goes. :)
Right, although the servercp says that I am running SAEF MODE I was also running gid safe mode. To keep security on the shared server I changed the option for gid safe mode to off and it gives exactly the same, so that aint it.
In addition to this I switched the vb options for server safe mode to on and it refused to allow attachments to be uploaded. I switched back to off and it works fine. This makes me think it aint the server but something else.
Don't really want to be turning the SM off in the CP, and it's taking 2-3 hours for settings to change so it's not something I can tryout quickly if you know what I mean.
Any more thoughts?
Just double checked the error and it has actually changed by dropping the gid part of the error:
Content visible to registered users only.
K
Morgan
01-12-2006, 05:27 PM
Does the 793 directory have 777 permissions?
Morgan
01-12-2006, 07:19 PM
Regarding safe mode, there is a blog (http://ilia.ws/archives/18-PHPs-safe_mode-or-how-not-to-implement-security.html) where the last comment says:
Content visible to registered users only.
The issue you're experiencing with safe mode is because the PHP script has its own UID/GID (6344/6344) but the directory where the uploaded files are to go has a different UID/GID (99/99) and as 6344 != 99 you get the error message.
You could try Titov's patch, if you are server admin, or else try to convince your host to apply the patch. Alternatively, there is a page (http://bugs.php.net/bug.php?id=24604) where the last comment says:
Content visible to registered users only.
vBulletin® v3.8.5, Copyright ©2000-2025, Jelsoft Enterprises Ltd.