Announcement

Collapse
No announcement yet.

File permissions and more

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File permissions and more

    Is there a way I can set the default permissions for people to be 777? So anything they do is accessible by everyone?

    Also, is there a way I can FTP a file to a unix box from a windows box and maintain the original date and time stamps?

    side note: why does chmod -R 777 * take hours?

  • #2
    You want to use 'umask' to set the user's file creation mask.

    Where are you doing the 'chmod -R 777 *' from?
    Gigabyte GA-K8N Ultra 9, Opteron 170 Denmark 2x2Ghz, 2 GB Corsair XMS, Gigabyte 6600, Gentoo Linux
    Motion Computing M1400 -- Tablet PC, Ubuntu Linux

    "if I said you had a beautiful body would you take your pants off and dance around a bit?" --Zapp Brannigan

    Comment


    • #3
      I think (so someone more certain should confirm/clarify this) that umask defines the bits that should be cleared from the default permission bits. So to make everything as permissible as possible, you want to use umask 000 - put it either in /etc/profile or the appropriate users' startup scripts.
      Blah blah blah nick blah blah confusion, blah blah blah blah frog.

      Comment


      • #4
        Oh, and with the ftp thing, I think it will depend on the ftp client you use.
        Blah blah blah nick blah blah confusion, blah blah blah blah frog.

        Comment


        • #5
          Ok, sounds good so far.

          I'm running a SAMBA server on this machine, so people telnet'ing into it or anything...so if i put the umask command in their profile, would it even load and run the profile to fix the problem if they were creating things in windows explorer on the mapped drive?

          Comment


          • #6
            Ah, that's different....

            This is likely something you need to configure in Samba then. Never run Samba myself, so can't be of more use, sorry.
            Blah blah blah nick blah blah confusion, blah blah blah blah frog.

            Comment


            • #7
              Well, samba IS based off of user profiles.

              Comment


              • #8
                Ok, so i didn't have a profile in my /home/myusername directory...so I created a ".profile" file and put "umask 000" into it.

                Then all I did was "touch myself" and do an ls -al on it. it was rw,r,r

                wtf?

                Comment


                • #9
                  Isn't there a system or mount-specific permission mask? (actually, I think there's a mount option to set this)

                  I can't remember exactly.

                  - Steve

                  Comment


                  • #10
                    Explain?

                    Comment


                    • #11
                      Originally posted by Kooldino
                      Ok, sounds good so far.

                      I'm running a SAMBA server on this machine, so people telnet'ing into it or anything...so if i put the umask command in their profile, would it even load and run the profile to fix the problem if they were creating things in windows explorer on the mapped drive?
                      I'm not quite certain about what you want to do, but as I understand it you want to make every file "created" by a user over SAMBA readable, writable and executable by all users? If that is the case, then simply put

                      Code:
                      create mask = 0777
                      directory mask = 0777
                      in smb.conf for the share you want to apply it to. See http://se.samba.org/samba/docs/man/s...tml#CREATEMASK and http://se.samba.org/samba/docs/man/s...#DIRECTORYMASK for more information. If this isn't what you were wondering, then I apologize for wasting your time

                      And btw. SAMBA doesn't read /etc/profile or ~/.profile. They are intended for login shells.
                      Last edited by albatorsk; 19 May 2004, 10:54.

                      Comment


                      • #12
                        Originally posted by Kooldino
                        Ok, so i didn't have a profile in my /home/myusername directory...so I created a ".profile" file and put "umask 000" into it.

                        Then all I did was "touch myself" and do an ls -al on it. it was rw,r,r

                        wtf?
                        Just by creating the file, you didn't set your umask. You would have needed to source your .profile file first or open a new shell.
                        RC Agent
                        AMD Athlon 64 X2 5000+ Brisbane 2.6GHz, MSI 785GT-E63, 6 GB(2x1GB, 2x2GG) DDR2 800 Corsair XMS2, Asus EAH4850 TOP
                        AMD Athlon 64 X2 7750 Kuma 2.7GHz, ASRock A790GXH/128M BIOS 1.7, 4 GB(2x2GB) DDR2 800 Corsair XMS2, Gigabyte HD 6850 1GB DDR5
                        AMD Phenom II X6 1045T 2.7GHz, Asus M5A99FX Pro R2.0 BIOS 2501 , 8GB(2x4GB) DDR3 1866 CL9 Crucial BallisticX(BLT4G3D1869DT1TX0) , Sapphire HD7870 2GB GDDR5 OC, Seasonic 850w powers supply

                        Comment


                        • #13
                          Originally posted by albatorsk
                          I'm not quite certain about what you want to do, but as I understand it you want to make every file "created" by a user over SAMBA readable, writable and executable by all users? If that is the case, then simply put

                          Code:
                          create mask = 0777
                          directory mask = 0777
                          in smb.conf for the share you want to apply it to. See http://se.samba.org/samba/docs/man/s...tml#CREATEMASK and http://se.samba.org/samba/docs/man/s...#DIRECTORYMASK for more information. If this isn't what you were wondering, then I apologize for wasting your time

                          And btw. SAMBA doesn't read /etc/profile or ~/.profile. They are intended for login shells.
                          Awesome, that's exactly what I'm looking for. I'll try that tomorrow morning!!! Thanks!

                          Comment


                          • #14
                            [raid]
                            path = /raid
                            writeable = yes
                            guest ok = yes
                            create mask = 0777
                            directory mask = 0777
                            -------------------------------------

                            As far as files go, I'm ok...

                            But whenver I create a directory, it's still read only.

                            Does the server have to be restarted?

                            Comment


                            • #15
                              Also tried force directory mode = 0777, which did nothing.

                              Comment

                              Working...
                              X