Forum Moderators: phranque

Message Too Old, No Replies

Server File Permissions

Whats the code i should use?

         

mikem1986

9:19 am on Sep 12, 2008 (gmt 0)

10+ Year Member



Hi guys

I have a php script guestbook and this morning deleted it by accident when updating my website (stupid i know).

To stop this happening again whats the 3 digit file code which will make the guestbook read only and undeletable even when i hit the delete key but not stop users writing to the guestbook?

Can anyone advise?

wheelie34

5:01 pm on Sep 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CHMOD 666 is what I set mine to. But you asked for

1)make the guestbook read only #cancels out 3
2)undeletable #dont think its possible
3)not stop users writing to the guestbook #see 1

the 666 is to make the file readable and writeable.

HTH

old_expat

1:59 am on Sep 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I did that by accident once. I loaded files as 'root' and couldn't figure out why I couldn't updated with my 'user' ftp. A support tech clued me in to CHOWN.

It's not too elegant, but one possible approach.

EDIT: After reading your comments about a "60 year old' web designer, I just thought I shuld warn you that I'm 68 .. so you may not want to use this information.

phranque

10:03 am on Sep 21, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



what/where is the "delete key"?
my delete key only works on characters, not files.
=8)
did you delete the guestbook script or the guestbook data?
were you logged in as the file owner?
assuming you are administrating a *nix-type system, the results of an attempted delete are affected by the group and user of the file ownership, the group and user of the directory ownership (in which the file is located), the file mode of the directory, the file mode of the file to be deleted and the user doing the deletion as well as the group(s) in to which that user is assigned.
once you get that all figured out, you can probably do something about preventing accidental deletes of the guestbook script itself.
the guestbook data itself is in yet another file, possibly in another directory, or maybe in a database.
so that question requires more details to answer properly.