-   Linux - General (
-   -   I cannot access the partitions I mounted unless I am root (

AndrewZorn 03-10-2006 08:49 PM

I cannot access the partitions I mounted unless I am root
I am using gentoo

Here is my fstab:

# /etc/fstab: static file system information.
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
# See the manpage fstab(5) for more information.

# <fs>                        <mountpoint>        <type>                <opts>                <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT                /boot                ext2                noauto,noatime        1 2
/dev/sda2                /                ext3                noatime                0 1
/dev/sda3                none                swap                sw                0 0

/dev/sda1                /mnt/windows        ntfs                defaults,noatime,ro,user        0 0
/dev/sdb1                /mnt/external        ntfs                defaults,noatime,ro,user        0 0

/dev/cdroms/cdrom0        /mnt/cdrom        auto                noauto,user        0 0
#/dev/fd0                /mnt/floppy        auto                noauto                0 0

# NOTE: The next line is critical for boot!
proc                        /proc                proc                defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                        /dev/shm        tmpfs                nodev,nosuid,noexec        0 0

I can only get to 'windows' and 'external' as root. My user permissions are messed up, i tried to add stuff but now i barely have any permissions and now i supposedly have more than root

googling for linux user permissions is getting me nowhere ive looked on this for over an hour now and im sure its very easy

please help

gilead 03-10-2006 08:56 PM

Try the following and see if it does what you need:

/dev/sda1  /mnt/windows  ntfs  defaults,noatime,ro,user,umask=0000  0  0
/dev/sdb1  /mnt/external  ntfs  defaults,noatime,ro,user,umask=0000  0  0

AndrewZorn 03-10-2006 09:04 PM

ok ill reboot and try that

any idea how i can get a FULL list of the permissions, and how to properly change them for an existing user? usermod is confusing because im not sure if im ADDING or REPLACING permissions with -G

gilead 03-10-2006 09:12 PM

You don't need to re-boot for that to take effefct. Just modify /etc/fstab and remount the filesystem with:

mount -o remount /dev/sda1
mount -o remount /dev/sdb1

If you want to change the file system permissions for the NTFS partitions, you'll need to do that in /etc/fstab also - NTFS doesn't support Linux file system attributes. You can use the following (if your username is andrew):

/dev/sda1  /mnt/windows  ntfs  defaults,noatime,ro,user,umask=0000,uid=andrew  0  0
/dev/sdb1  /mnt/external  ntfs  defaults,noatime,ro,user,umask=0000,uid=andrew  0  0

Was that what you meant?

AndrewZorn 03-10-2006 09:15 PM

ok that allowed me to get to them

do you know where i can get an entire list of groups/permissions, and instructions on how to set them for users?

gilead 03-10-2006 10:19 PM

Have a look at man chmod, man chown and the info at - they provide a good explanation of what is happening. The list of users on your system is in /etc/passwd and the list of groups is in /etc/group.

Very briefly, there are three groups of permissions plus 'special permissions' so you'll see four numbers when people change permissions using octal notation. The octal numbers correspond to read, write and execute permissions. Read is 4, write is 2 and execute is 1. So to have a file that can be read, written and executed by anyone you could use either chmod 0777 filename or chmod ugo+rwx filename (ugo is each of user, group, other users)

The leading 0 in the 0777 and the ugo need further explanation, but it will be better described in the link above. For example you could use 'a' for all instead of ugo, etc.

AndrewZorn 03-11-2006 12:03 AM

ok i gave myself basically all the permissions of root, using gpasswd -a andrew ______, _____ being the permission and i went down the list one by one

yet i still cannot read CDrom unless im root

now id like to follow your instructions by am i going to have to do this every time or something? i just want to make it to where andrew has all the privileges of root, and then ill subtract out bin, root, and emerge or something later. its just a royal pain that i have to log out and go to my root accoutn which isnt hardly set up or customized or anything just to read a CDrom

gilead 03-11-2006 12:19 AM

You shouldn't have to be root to access your cdrom. You can modify /etc/fstab the same way as for the NTFS partition:

/dev/cdroms/cdrom0  /mnt/cdrom  auto  noauto,users,exec,ro,umask=0000,uid=andrew  0  0
The command to mount the cdrom when logged in as andrew is mount /mnt/cdrom

rmobarak 04-09-2006 02:24 AM

Can't access partitions with ntfs file format unless I am root
This info fixed the problem with Ubuntu 5.10, instead of remount, umount, then mount

All times are GMT -5. The time now is 09:19 PM.