Find the answer to your Linux question:
Results 1 to 5 of 5
can I change the default permissions for the folder only without changing it for the directories ? As umask 023 will change the default permissions for both ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    2

    change default permissions for folder only


    can I change the default permissions for the folder only without changing it for the directories ?
    As umask 023 will change the default permissions for both ?

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Is your question a type? In Unix/Linux systems they are called directories. Windows calls them folders: Directories=Folders. Do you mean files in a directory?

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    2
    My mistake , yea I meant files

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I'm not clear on which way you want it. If you have files in /home/user/test/ and you just want to change the permissions for test you would navigate to the /home/user/ directory in a termina and enter the command: chmod 755 test. This will give the user rwx permission and group and others read/execute.

    If that's not what you want you need to be more specific.

  5. #5
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,190
    The permissions for files are not inherited in any way from the parent directory; they are completely independent. So if you change the permissions on the directory, the files it contains are not affected directly.

    Of course there may be indirect effects: if you take away read/execute access on the directory, you can't get at the files, and if you take away write access, you can't rename or delete files. But the files' own permissions aren't changed.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

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