1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

umask

Discussion in 'Linux / Unix Discussion' started by tripwire45, Aug 23, 2005.

  1. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    I'm really having trouble with this one (cue Freddy and Ryan). I don't get how it is supposed to work and obviously I'm missing something. It seems like if you type:
    Code:
    umask 022 filename
    that a file with the permissions 666 should have them changed to 644. I tried this on my trusty Debian box and the file permissions don't change at all. I know I am missing something from the description. Here is the link I'm working from:

    http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch18/395-398.html

    Please let me know where I am going wrong. :oops:
     
    Certifications: A+ and Network+
  2. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    8,871
    167
    256
    When a user creates a file or directory, it is *created* using a default set of permissions. These default permissions are determined by the value of umask that is set in the /etc/profile system file or in the user's .cshrc, .login or .profile

    Trip, it's all new to me but from the above statement I read the word created not modified? Have you changed the value of umask in one of the above mentioned files and then created a text file and looked at the default perms. The gist I get is that they should reflect the changes?

    Pete
     
    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)
  3. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    Oh duh. Makes sense now. You are an ubergeek, Pete. Mr. MCSE on his way to being Linux-guru. Is there nothing you can't do (ok...besides defuse a nuclear bomb with a pair of twizzers)? :biggrin
     
    Certifications: A+ and Network+
  4. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    8,871
    167
    256
    Give me a bomb and a pair of tweezers and I'll have a bash :hhhmmm

    I might need a bit of sticky backed plastic, a Fairy Liquid bottle and a paper doily as well though. Not to mention copious amounts of duct tape :eek:

    BTW I installed Simply MEPIS yesterday, it uses KDE on top of a Debian derivative. I quite like the features in KDE actually, even if they are more Windows like :rolleyes:

    Hopefully I can stay loyal to Microsoft and enjoy the Open Source world too. I don't understand why some people can't see the good in both alternatives.

    Pete
     
    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)

Share This Page

Loading...