FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Problems locking/unlocking files
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Problems locking/unlocking files [message #19213] Fri, 02 July 2004 08:34 Go to next message
djnz is currently offline  djnz   United Kingdom
Messages: 14
Registered: July 2004
Karma: 0
Junior Member
My new installation of FUDforum was working fine until I locked and unlocked the files, then it broke.

Unlocking files seems to set permissions to 777, but my (shared) host has php configured to prevent inclusion of files with world write (presumably to prevent running scripts which may have been changed by a guest, although how a guest would get access to a file to change it I am not sure). This may be a common situation in cPanel/WHM environments with PHP as a cgi.

When I reset everything to 755 it worked fine.

I an understand why you might want to 777 the files, because in a with PHP as an Apache module they will normally be created with user and group nobody because of the way your installation routine works. However with php as a cgi set up correctly it is not necessary because the files are owned by your user.

Could you have a configuration option to toggle unlocking between 777 and 755? Come to think of it, this is not necessary, you could just optionally disable unlocking/locking so it is not done by mistake.
Re: Problems locking/unlocking files [message #19222 is a reply to message #19213] Fri, 02 July 2004 13:00 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Unlocking with 755 has only partial usefullness since you still won't be able to modify the files under your account, which is ultimate goal of unlocking them.
Given that you have this problem I'd recommend writing a very simple PHP script that would be able to go through the forum's directories and chmod all *.php files 700 or 755 once you are done working with them. Alternatively you can use the file manager to just change permissions on the files you are working with rather then using unlock/lock control panel that affects all of the forum's files.


FUDforum Core Developer
Re: Problems locking/unlocking files [message #19224 is a reply to message #19222] Fri, 02 July 2004 13:30 Go to previous messageGo to next message
djnz is currently offline  djnz   United Kingdom
Messages: 14
Registered: July 2004
Karma: 0
Junior Member
Ilia wrote on Fri, 02 July 2004 09:00

Unlocking with 755 has only partial usefullness since you still won't be able to modify the files under your account, which is ultimate goal of unlocking them.

Not true with php as a cgi running under my user - the files were created (by the install script) by php running as me so I am the owner and can modify them no problem and there is never any need to unlock them.

The flip side of this is that the Apache user (nobody) is not the owner of any files so anything to be seen by apache must have at least world read and locking the files seems to break this.

I just need to make sure I never touch lock/unlock!
Re: Problems locking/unlocking files [message #19229 is a reply to message #19224] Fri, 02 July 2004 13:46 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If you are using CGI then you don't need to use lock/unlock since you are the owner of the files already.

FUDforum Core Developer
Re: Problems locking/unlocking files [message #19245 is a reply to message #19229] Fri, 02 July 2004 21:50 Go to previous messageGo to next message
djnz is currently offline  djnz   United Kingdom
Messages: 14
Registered: July 2004
Karma: 0
Junior Member
Yes exactly, it's just a shame I was tricked into doing so by the 'you must unlock your files before running mailing list import' message and broke my forum as a result. The on-screen messages and documentation could be more helpful here to save others my grief - perhaps the message could say 'write-enable' and 'write-protect' rather than 'unlock' and 'lock' because the former makes it obvious you are talking about permissions but the latter makes it look like an application-level lock.
Re: Problems locking/unlocking files [message #23316 is a reply to message #19213] Fri, 11 March 2005 19:53 Go to previous messageGo to next message
LastQuark   United States
Messages: 12
Registered: August 2003
Karma: 0
Junior Member
Just want to say thanks for this thread. I was in the same predicament and spent several hours until I read this thread.

I am also using CPanel on a shared webhost. So the lesson here is: Do not use the lock/unlock button!

Re: Problems locking/unlocking files [message #24873 is a reply to message #23316] Wed, 18 May 2005 05:50 Go to previous messageGo to next message
leecovuk is currently offline  leecovuk   United Kingdom
Messages: 43
Registered: May 2005
Karma: 0
Member
I'm trying to get an install with mail list going in cpanel and have also come a cropper to the same misunderstanding/problem here.

So, now that my forum has apparently broken and all web pages are 'internal server error', do I have to scrap everything and reinstall?

Or can someone tell me a permissions (?) fix which will bring things back?

I only tried to 'unlock' in the first place, because I read elsewhere that my troubles with piping to the maillist.php script may be due to this.

Thanks a lot,
lee

[Updated on: Wed, 18 May 2005 05:50]

Report message to a moderator

Re: Problems locking/unlocking files [message #24874 is a reply to message #24873] Wed, 18 May 2005 05:53 Go to previous messageGo to next message
leecovuk is currently offline  leecovuk   United Kingdom
Messages: 43
Registered: May 2005
Karma: 0
Member
just to add, I don't think I have php as a 'cgi' binary ....
I do think however it is a 'binary' in the standard php server location.
Re: Problems locking/unlocking files [message #24885 is a reply to message #24874] Wed, 18 May 2005 13:49 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Sounds like the forum's file permissions were screwed up and the webserver denied access to the forum files. You need to adjust the forum file permissions to allow the webserver to read them.

FUDforum Core Developer
Re: Problems locking/unlocking files [message #24909 is a reply to message #24885] Wed, 18 May 2005 17:05 Go to previous messageGo to next message
leecovuk is currently offline  leecovuk   United Kingdom
Messages: 43
Registered: May 2005
Karma: 0
Member
thanks;
I found / decided I couldn't put things right without a fresh install.

I'm new to Fudforum since yesterday, and I'm hoping it may be an alternative to phpBB + Mail2Forum; there are a couple of phpBB processing / coding issues I am hoping to find are not the same with Fud. Will test more and search the threads here.

btw my pipe to the mail list seems to work cleanly if I start the line with |php -q


bye for now,
lee
Re: Problems locking/unlocking files [message #24912 is a reply to message #24909] Wed, 18 May 2005 17:51 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Sounds like your have php-cgi on the command line, where -q flag is necessary to block the sending of headers.

FUDforum Core Developer
Re: Problems locking/unlocking files [message #24914 is a reply to message #24912] Wed, 18 May 2005 17:57 Go to previous message
leecovuk is currently offline  leecovuk   United Kingdom
Messages: 43
Registered: May 2005
Karma: 0
Member
very impressed with the apparently consistently swift replies here! Good stuff guys!

ok; I don't have command line access so the whole php-cgi thing is an unknown to me, but I'm sure you're right because I was certainly getting 'mail delivery errors' including a strange 'headers' thing otherwise.

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Blank screen when posting to newsgroups
Next Topic: attachments on secure connection & IE
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Oct 19 20:39:27 GMT 2024

Total time taken to generate the page: 0.02022 seconds