Forum Moderators: phranque

Message Too Old, No Replies

Problem with permissions/chmod

         

puremetal

4:33 pm on May 9, 2008 (gmt 0)

10+ Year Member



Hi all,

I'm trying to get a config file on one of my sites to have read only permissions (which would be 400). But each time I change it to 400 the log says...

> SITE chmod 400 /htdocs/config.php
< 200 Permissions changed on /htdocs/config.php
> CWD /htdocs
< 250 OK. Current directory is /htdocs

which suggests the perms have been changed. But when I look at the config file again its back to 600 (owner read/write).

My question is: is it possible to have read-only perms, or does it not work for a good reason? If it is possible, might it be my ISP being crap?

Thanks :)

encyclo

1:45 pm on May 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would ask your host - however, even 600 is OK in most circumstances, as the group and others can't read the file.

rocknbil

4:42 pm on May 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



^ ^ Agreed, but to answer the "why," it's also possible your FTP client (assuming WS_FTP by your post) is not doing what it says it's doing, OR the permissions of the FTP user are limiting your ability to change the file. If you have SSH access, you could try it by command line.

puremetal

11:31 am on May 30, 2008 (gmt 0)

10+ Year Member



Thanks you two... I've worked out a get-around for the problem now, but its still annoying. I have tried SSH access but that did the same, and also tried it in two FTP clients... and I have the master FTP account, too.

My guess is its my host being really restrictive (somehow, for some reason), as this isn't the first time problems like this have come up. I'd move to a different host but these guys are a) cheap, and b) have way too many of my sites, making moving a nightmare!

Thanks all the same :)