chmod 777 664
Hey i am trying to chmod my /home folder to read, and every /upload folder that excists in /home must be 775. So what i did was
chmod -R 664 /home chmod 775 */*/upload chmod 775 */*/Upload But when i do the chmod for home with 664 the users cant login anymore, and when i set it to 777 my users can login? Is 664 not good, or what should i do? thx |
You need executable permissions to access a directory. So try 755 or 775, 644 will not work.
Edit: saw this on the freebsd handbook, this should clarify things: Quote:
|
find /home -type d -exec chmod 775 {} +
find /home ! -type d -exec chmod 664 {} + would have been better because you can't access your own files if the directories don't have 'execute' permission. Anyway, I wouldn't execute the above commands on my home directory: executable files (if any) wouldn't be executable anymore. Yves. |
find /home -type d -exec chmod 775 {} +
find: missing argument to `-exec' find /home ! -type d -exec chmod 664 {} + find: missing argument to `-exec' :( |
I think you end it with a \; instead if a +.
As the Yeti says, running the 2nd command is not really recommended if you have executables in /home. |
Older versions of find don't know the '+' syntax. From the man page here with Mandriva 2008.0:
Code:
-exec command ; Yves. |
so i did
find /home -type d -exec chmod 775 {} \; find /home ! -type d -exec chmod 664 {} \; k but now still all folders are still fully righted, i can still can upload to /home folders and /upload folders? So somethings is still off. Cause i just want that all folders are readeble but you cannot change anything or delete anything or upload anything to that folder. And to all /upload folders they can do what the heck they want with . |
maybe this info helps, my user home folders work as ftp server. The users itself can not upload any data to their home folder unless its in the upload folder.
for example: /home/jack/upload |
All times are GMT -5. The time now is 07:54 AM. |