how can I lock a directory with chflags schg ?




I have a directory with particular permissions on it, etc., that I want to
make _absolutely sure_ never gets changed to different permissions.

So I figured, easy, I'll just:

chflags schg /dir

but I notice that once you chflags schg a directory, you can no longer
write to that directory. Is this correct ? Am I also correct that I
_can_ continue to write to subdirectories of the schg directory ? (I seem
to be able to)

Is there any way to lock down a directory the way i want to, and still be
able to write to it ?

Thanks.

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Linked .csv File Locking
    ... MS Access can lock a linked .csv file even though the file permissions are ... and the directory permissions are read-only. ...
    (microsoft.public.access.security)
  • Re: Database in readonly mode with FE/BE setup
    ... Regardless of the permissions you have ... assigned to the folder if ANY user opens the database in Exclusive Mode ... one lock which is the only lock I use. ...
    (microsoft.public.access.security)
  • Re: access() is a security hole?
    ... >> Perhaps the way to avoid the race is to open the file, lock it, ... > can't tell you that access should have been blocked due to permissions ... > inode returned by the fstatand statare the same makes the race ... > there's no way to securely do this and handle symlinks (because you ...
    (FreeBSD-Security)
  • Re: restricting access to subdirectory globally accessible
    ... >> subdirectories of which are, funnily enough, each project for our ... >> I don't know how to have different permissions on the subdir. ... "staff" for all others. ... directory is accessed through samba and allow all to see it. ...
    (comp.unix.admin)
  • Re: permission denied - can files be locked in linux?
    ... I understand permissions, but I don't have shell access. ... think PHP can lock files, but I didn't know it affected the filesystem... ... even using the app provided by the hosting company. ...
    (alt.os.linux)