--
Powered by OpenBSD
Quote:> I'm trying to lock down a FTP server. One thing I'd like to do is assign
> different permissions for directories and files. Is there a way I can
> recursively assign permission based on whether it's a directory or a file?
Anyone else have any idea?
> --
> Powered by OpenBSD
> > I'm trying to lock down a FTP server. One thing I'd like to do is
assign
> > different permissions for directories and files. Is there a way I can
> > recursively assign permission based on whether it's a directory or a
file?
You probably want to do something like this:
chmod -R a+rX *
Cheers,
Scott
> I'm trying to lock down a FTP server. One thing I'd like to
> do is assign
> different permissions for directories and files. Is there a way I can
> recursively assign permission based on whether it's a
> directory or a file?
find . -type f -print0 | xargs -0 chmod 644
Note the -print0 and -0 options make it work with files with whitespace
in their names.
--
stephen
Not sure of the exact syntax, but you can specify it to list all
files/directories seperately, then execute a command on them, eg.
"chmod 666".
saves a lot of intermediate processes, and is simpler to remember than
the barbaric -exec syntax.
Symbolic modes are often very handy with chmod -R, especially the magic +X.
1. Automatic changing file ownership in certain directories
Is there a way to have any files I put in my httpd directory change to
the web servers user/group automatically. I know this happens when I ftp
files to a remote machine but can I have it do this locally?
3. Changing httpd directory ownership, security risk?
4. C++ Opensource CGI Library (OT)
5. Mail directory changing ownership?
6. Trying To Boot Linux Universe
7. Can view contents of directory, but cannot change into directory /& SATA support
9. ownership of files in kde directories
10. Default ownership of files in a directory
11. More on design philosophy of file/directory ownership/permissions ...
12. Ownership of file created in directory question
13. 2.1.5 & Changing Ownership