LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   permissions (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-169194/)

spuppett 04-12-2004 12:19 PM

permissions
 
I would like to access my /dev/hda from <user> rather than root. Everyone has read permissions, but only root can cd into the folder. Its mounted, so I don't think thats the problem. I su'd and tried to chmod about every combo I could think of, but the permissions don't change. Is there a special chmod for dirs? What am I doing wrong??

Thanks

Mr.Bill.Gates 04-12-2004 01:00 PM

/dev/hda is the whole disk. You probably mount partitions like /dev/hda1 /dev/hda2 and so on. There's no special chmod for directories. But they are virtually useless without both read and execute permissions. So you should use something like this:

# chmod 755 /mnt/mydir

Then you might need to modify this file

/etc/fstab

but read the manual first:

# man fstab

There is an option that lets ordinary users mount partitions and other media.

P.S. I hope this helps although i'm a total newbie myself :-)

spuppett 04-12-2004 01:04 PM

I tried that stuff. I changed fstab to
Code:

/dev/hda1        /mnt/win        vfat        noauto,owner    1  0
but all that did was not mount at start up. When I went to /mnt everything looked like I could go there, i.e. drwx-xr-xr, but when I mounted it, things changed back to drwx--r--r.

I appreciate the reply and any other insights would be appreciated as well.

Mr.Bill.Gates 04-12-2004 01:15 PM

noauto means do not mount when "mount -a" is given, e.g at boot time
you should probably remove that option

owner means that only the owner of /dev/hda1 file can mount it (it's probably root)
what you need is "user" not "owner"

so that line should look like this

/dev/hda1 /mnt/win vfat user 1 0

nightjar 04-12-2004 01:32 PM

Try with

/dev/hda1 /mnt/win vfat iocharset=iso8859-1,umask=0,codepage=850 0 0


All times are GMT -5. The time now is 01:20 PM.