Announcement

Collapse
No announcement yet.

setting directory permissions

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    setting directory permissions

    I cant seem to get my directory permissions quite right... i want to make /media/OS/Users available to rwx for owner and group. owner is chris, group is Family. what would the correct syntax be for the konsole? i have tried to kdesudo dolphin and then set the permissions through the dialog, but it doesnt change!
    what am i doing wrong?

    thanks again, and sorry for all the questions!
    is NOT going back to microshaft!

    #2
    Re: setting directory permissions

    One way is to change the ownership to chris:family
    Code:
    sudo chown -R chris:family /media/OS/Users
    You will then want to add your user (chris) to the group family.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: setting directory permissions

      this is what happens...

      Code:
      chris@Harper-Inspirion-1545:/media/OS$sudo chown -R chris:Family Users
      sudo: unable to resolve host Harper-Inspirion-1545
      chris@Harper-Inspirion-1545:/media/OS$ls -l
      drwx- - - - - - 1 chris chris   4096 2011-07-18 08:08 Users
      is NOT going back to microshaft!

      Comment


        #4
        Re: setting directory permissions

        Do you have the group Family created? You are using an uppercase F, yet your post indicated a lowercase f. Case sensitivity has to be observed in Linux.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: setting directory permissions

          the group Family was created through the User Management in the System Settings menu...it does have a capital F.
          is NOT going back to microshaft!

          Comment


            #6
            Re: setting directory permissions

            The error here is coming not from your chown attempt, but from sudo. Note the part in bold:

            chris@Harper-Inspirion-1545:/media/OS$sudo chown -R chris:Family Users
            sudo: unable to resolve host Harper-Inspirion-1545
            chris@Harper-Inspirion-1545:/media/OS$ls -l
            drwx- - - - - - 1 chris chris 4096 2011-07-18 08:08 Users
            I'd guess that you need to fix your /etc/hosts file. You should see the following line in it:

            Code:
            127.0.0.1 Harper-Inspirion-1545
            Would you verify that for us, please?

            Comment


              #7
              Re: setting directory permissions

              SteveRiley,

              I did manage to correct this...I had changed /etc/hostname and forgot to update /etc/hosts
              /etc/hosts now reads:
              Code:
              127.0.0.1   localhost
              127.0.1.1   Harper-Inspirion-1545
              should the second like have 127.0.0.1 instead of 1.1 ?
              the sudo error doesnt come back, but im still not able to change rwx attributes...
              is NOT going back to microshaft!

              Comment


                #8
                Re: setting directory permissions

                Originally posted by chagmaier
                should the second like have 127.0.0.1 instead of 1.1 ?
                No. The IP is correct.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: setting directory permissions

                  hostname should contain only the name of your host, no IP addresses. As far as hosts goes, yes snowhog corrected me; I let old habits override my typing. (Actually, 127.any.any.any will work.)

                  Do you see any output at all now when you try the command?

                  Comment


                    #10
                    Re: setting directory permissions

                    Originally posted by chagmaier

                    the sudo error doesnt come back, but im still not able to change rwx attributes...
                    chown will change the owner and group........"chmod" changes the rwx attributes.

                    VINNY
                    i7 4core HT 8MB L3 2.9GHz
                    16GB RAM
                    Nvidia GTX 860M 4GB RAM 1152 cuda cores

                    Comment


                      #11
                      Re: setting directory permissions

                      Originally posted by vinnywright
                      chown will change the owner and group........"chmod" changes the rwx attributes.
                      Well don't I feel like a moron right about now. :P

                      Comment


                        #12
                        Re: setting directory permissions

                        Code:
                        $sudo chmod 771 -R /media/OS/Users
                        i press enter and it "works/pauses" for a moment then returns to the prompt. checking (ls -l) again shows NO changes to the directory.

                        http://ss64.com/bash/chmod.html ...towards the middle of the page where it gives syntax examples, it only shows changing permissions for files. am i trying to change permissions for "Users" file instead of dir?

                        thanks for all the help guys, im off to work now, it may be late this evening before im able to reply again. (9-10pm EST)

                        chris
                        is NOT going back to microshaft!

                        Comment


                          #13
                          Re: setting directory permissions

                          can we assume you have /media/OS/ being mounted at start with an entry in /etc/fstab ?

                          if so please post the line from fstab.

                          if you have umask values set in fstab your chmoding will be ignored in favor of the values set in fstab.

                          hear is a line from my fstab for a mounted partition I use for my data.

                          UUID=6d8f8f09-a999-4405-ad9a-e0df9224a3ba /mnt/data ext4 defaults,rw, 0 2
                          it's permissions are
                          vinny@vinnys-HP-G62:/mnt$ ls -l
                          total 8
                          drwxrwxr-x 8 root vinny 4096 2011-09-09 22:34 data
                          the group vinny could be anything as long as you are in that group.

                          this works well for me.

                          VINNY

                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #14
                            Re: setting directory permissions

                            Originally posted by vinnywright
                            if you have umask values set in fstab your chmoding will be ignored in favor of the values set in fstab.
                            That is slightly misleading. For non-posix filesystems (like ntfs or fat), file and directory ownerships are set at mount time using mount options (uid, gid, umask, dmask and fmask)...and you can't use chown or chmod to change the ownership or permissions (since these filesystems don't support POSIX ownerships/permissions). These mount options are not used with POSIX filesystems (like ext).

                            Originally posted by vinnywright
                            can we assume you have /media/OS/ being mounted at start with an entry in /etc/fstab ?

                            if so please post the line from fstab.
                            This is a good way forward.

                            Comment


                              #15
                              Re: setting directory permissions

                              Originally posted by kubicle
                              Originally posted by vinnywright
                              if you have umask values set in fstab your chmoding will be ignored in favor of the values set in fstab.
                              That is slightly misleading. For non-posix filesystems (like ntfs or fat), file and directory ownerships are set at mount time using mount options (uid, gid, umask, dmask and fmask)...and you can't use chown or chmod to change the ownership or permissions (since these filesystems don't support POSIX ownerships/permissions). These mount options are not used with POSIX filesystems (like ext).
                              Aaaa,thanks for the clarification. I was working just from the man page and it didn't specify.

                              VINNY
                              i7 4core HT 8MB L3 2.9GHz
                              16GB RAM
                              Nvidia GTX 860M 4GB RAM 1152 cuda cores

                              Comment

                              Working...
                              X