Find the answer to your Linux question:
Results 1 to 4 of 4
Thank you. I have a very strange scenario which I cannot seem to understand. The situation is like this: I have a directory (named as session) whose permission is drw------- ...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6

    Permissions question

    Thank you.

    I have a very strange scenario which I cannot seem to understand. The situation is like this:

    I have a directory (named as session) whose permission is drw------- and I changed it to drwxrwxrwx because I wanted to create some files and directories below it for testings.

    I used chmod to change the permissions when I login as root. I find that the owner and group of the directory is apache. After changing, when I create a new file, I find that the permissions of the new file remain as -rw-------.

    So I use umask and found that the value is 0022. I changed it umask 0000 to give me total access. But I still cannot create a file or directory which is read write and execute.

    I reboot my server thinking that this will help. But it does not. When I type umask, it is changed back to 0022.

    What is happening? How can I make the permissions I changed remain and work?


  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    By default when you create files or directories, the execute permission is not automatically set. You have to manually set execute permissions on. I think its actually a built in security feature and not a bug.

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    6
    I did change the permissions using chmod. But the permissions did not change for the files under that directory. So, I used umask 000 to force it down. It works until I reboot the server. Then the permissions and umask status is changed back to normal.

    How can I make the change that I made stick?

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by judyksp View Post
    I did change the permissions using chmod. But the permissions did not change for the files under that directory. So, I used umask 000 to force it down. It works until I reboot the server. Then the permissions and umask status is changed back to normal.

    How can I make the change that I made stick?
    If you want to make umask *permanent* you need to put the relevant umask command into your ~/.bashrc and/or ~/.bash_profile files(s).

Posting Permissions

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