Announcement

Collapse
No announcement yet.

Disk permissions problem

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

    Disk permissions problem

    I'm on a dual boot, XP and kubuntu, and I have a shared drive formatted FAT 32 (hda5) so I can swap mp3's between the two OS's. Thing is, I can't save anything to the hda5 when logged into kubuntu. I have tried sudo konqueror in an attempt to change the permissions, but the drive keeps defaulting to root. I added my user account to the root group and I still cant write to hda5. I'm stuck as to what to do next. Can anyone point me in the right direction?


    #2
    Re: Disk permissions problem

    I'm presuming that hda5 is mounted during boot as owned by root and can only be accessed by root.
    Can you post the contents of /etc/fstab?
    Jucato's Data Core

    Comment


      #3
      Re: Disk permissions problem

      /dev/hda5 /media/hda5 vfat defaults 0 0

      is the result for the entry pertaining to the drive in question.

      Comment


        #4
        Re: Disk permissions problem

        Ok, here's mine:
        Code:
        /dev/hdb6 /media/shared vfat defaults,uid=1000,gid=1000,auto,rw,nouser 0 0
        Substitute uid ang gid with your own user/group id. Basically what this does it that it makes the user with the specified uid/gid the owner of that partition, also giving him read/write access (forgot what the auto and nouser options mean).
        Jucato's Data Core

        Comment


          #5
          Re: Disk permissions problem

          Originally posted by Jucato
          Ok, here's mine:
          Code:
          /dev/hdb6 /media/shared vfat defaults,uid=1000,gid=1000,auto,rw,nouser 0 0
          Substitute uid ang gid with your own user/group id. Basically what this does it that it makes the user with the specified uid/gid the owner of that partition, also giving him read/write access (forgot what the auto and nouser options mean).
          ok, how do i do that?

          Comment


            #6
            Re: Disk permissions problem

            oh, sorry about that
            Basically you run Kate (KDE Advanced Text Editor) as root to be able to edit the /etc/fstab file. enter in a terminal or in a Run Dialog box (Alt+F2)
            Code:
            kdesu kate /etc/fstab
            then replace your /dev/hda5 line with something like this:
            Code:
            /dev/hda5 /media/shared vfat defaults,uid=1000,gid=1000,auto,rw,nouser 0 0
            substitute the uid and gid with your own uid and gid. You can check your uid and gid in System Settings > Personal group > User Account. (usually, if it's the first user you made, the uid and gid are both = 1000)
            Jucato's Data Core

            Comment


              #7
              Re: Disk permissions problem

              I've found that this works. I would assume Jucato's method works as well.

              Code:
              /dev/hda5  /media/hda5  vfat  iocharset=utf8,umask=000 0  0
              Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

              Comment


                #8
                Re: Disk permissions problem

                Well, it worked for me. Just not sure it will work 100% for everyone
                Btw, aysiu, while we're in the topic, would you know what auto, nouser, and iocharset do?
                Also, isn't umask supposed to be 4 digits? like umask=0000? I'm confused because umask uses the opposite of what you would do in chmod right? Like umask=000 is equal to 777 in chmod? (Pardon the confusion... )
                Jucato&#39;s Data Core

                Comment


                  #9
                  Re: Disk permissions problem

                  Originally posted by Jucato
                  Btw, aysiu, while we're in the topic, would you know what auto, nouser, and iocharset do?
                  Not a whole lot. The iocharset=utf8 thing makes the filesystem case-sensitive (which Ubuntu gives you a big warning about, but I haven't seen any adverse affects from this parameter). As for auto and nouser, you may want to read this page:

                  http://www.tuxfiles.org/linuxhelp/fstab.html

                  Also, isn't umask supposed to be 4 digits? like umask=0000? I'm confused because umask uses the opposite of what you would do in chmod right? Like umask=000 is equal to 777 in chmod? (Pardon the confusion... )
                  I guess it is supposed to be four digits. I've always used three and never had any problems. Here's a clip from what looks like a man page for umask:
                  Umask sets the mask applied to newly created file and directory permissions within a given context. By default, the Umask in the server configuration, <VirtualHost> or <Anonymous> block is used, unless overridden by a "per-directory" Umask setting. Any arguments supplied must be an octal number, in the format 0xxx. An optional second argument can specify a Umask to be used when creating directories. If a second argument isn't specified, directories are created using the default Umask in the first argument. For more information on umasks, consult your operating system documentation/man pages.
                  Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

                  Comment


                    #10
                    Re: Disk permissions problem

                    Neither worked for me unfortunately

                    Looks like I might have to do a re-install... Nothing I try seems to make a difference.

                    Comment


                      #11
                      Re: Disk permissions problem

                      Originally posted by miso
                      Neither worked for me unfortunately

                      Looks like I might have to do a re-install... Nothing I try seems to make a difference.
                      Whoa! Whoa! Whoa!

                      Hold on. Don't reinstall. That is very extreme, and I can guarantee it won't help this problem.

                      Can you try rebooting? After you change the /etc/fstab, the changes don't happen immediately.
                      Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

                      Comment


                        #12
                        Re: Disk permissions problem

                        I've rebooted on both occasions and it tells me the disk is not mounted. I mounted it and still keeps erroring. I think I'm just going to format both partitions and start again. Its no big deal, I've not got any critical data. And its all part of the learning process

                        Comment


                          #13
                          Re: Disk permissions problem

                          you could try running automount


                          Comment


                            #14
                            Re: Disk permissions problem

                            Originally posted by miso
                            /dev/hda5 /media/hda5 vfat defaults 0 0
                            you could also edit the defaults option and repalce it with...
                            auto,user,rw,sync

                            Comment


                              #15
                              Re: Disk permissions problem

                              Originally posted by jturnbul
                              auto,user,rw,sync
                              That won't work, 'user' means the filesystem can be mounted by a user and unmounted by the same user, but since the filesystem is mounted during boot (as root) with the 'auto' option it makes no difference. :P

                              If you want it mounted during boot you have to either mount it owned by a user ('uid') or give wider permissions ('umask')

                              Also rw and auto are already included in 'defaults'.

                              Either of these lines (not both) should work (as already suggested by Jucato and aysiu):
                              /dev/hda5 /media/hda5 vfat umask=0000 0 0
                              /dev/hda5 /media/hda5 vfat uid=1000,gid=1000 0 0

                              You can also define other options like 'utf8' if you prefer, but those are the ones you need. (You can also combine 'uid' and 'umask', like this for example: umask=0077,uid=1000,gid=1000)

                              If they don't work (remember to boot or remount) there is something wrong with the system or the partition.

                              Comment

                              Working...
                              X