Find the answer to your Linux question:
Results 1 to 5 of 5
The permissions on one of our drives have got a bit screwed up. I need to make all the directories with attributes with 664 and any other file 770 Is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    ian
    ian is offline
    Just Joined!
    Join Date
    Nov 2002
    Location
    Cambs Uk
    Posts
    31

    File permissions


    The permissions on one of our drives have got a bit screwed up.

    I need to make all the directories with attributes with 664 and any other file 770

    Is there a way I can do this with chmod recursively setting only the directories and then only the 'other' files. (There are too many to go through and set individually)

    Ta
    Ian

  2. #2
    Just Joined!
    Join Date
    Jul 2004
    Location
    UK
    Posts
    77

    Post subject: File permissions

    The only thing I can think of is chmod -R 0664 FILE where FILE is the name of the directory you want to change permissions on. the -R options is for recursively changing files in that directory.

    I hope this helps you somewhat.

    Armage

  3. #3
    Linux User
    Join Date
    Jul 2004
    Posts
    256
    You could to a perlscript to check if dir do this else do this
    --monkey

  4. #4
    Just Joined!
    Join Date
    Jul 2004
    Location
    Iran
    Posts
    20

    File permissions

    good question
    use * in your chmod command.
    chmod 664 *
    this command change all the contents of your folders permission.
    so you can mv your directories to another directory and change your files and folders permission seprately.

  5. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Code:
    find <yourdirectory -type d | chmod 664 *
    find <yourdirectory -type f | chmod 770 *
    Should do the trick.....
    Regards

    Andutt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •