LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Mounting external HDD as user (https://www.linuxquestions.org/questions/mandriva-30/mounting-external-hdd-as-user-343393/)

mabalel 07-15-2005 05:35 AM

Mounting external HDD as user
 
I've just installed Mandriva and have a nagging problem. As ROOT, I can see all my partitions (including windows xp) and read from them. However, this is not possible as USER. I am able to mount but cannot read. I've tried playing aroung with fstab, and a coupla other settings, but this has been fruitless.

Please assist.

mgmax 07-15-2005 06:24 AM

Could you post your fstab's relevant entries?

Max

mabalel 07-19-2005 05:47 AM

Mounting external HDD as user
 
Thanks for the reply. I've pasted my fstab below and hope you will find it useful in assisting. Interestingly, I CAN read from all my partitions (this includes the partitionn with windows xp plus the 2 partitions on the ext HDD i.e. sda5) as ROOT. As USER, I can not.

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/hda6 / ext3 noatime 1 1
/dev/hda8 /home ext3 noatime 1 2
/dev/hdc /mnt/cdrom iso9660 user,iocharset=utf8,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0022,iocharset=utf8,sync 0 0
/dev/hda1 /mnt/win_c ntfs umask=0022,nls=utf8,ro 0 0
/dev/hda5 /mnt/win_d ntfs umask=0022,nls=utf8,ro 0 0
none /proc proc defaults 0 0
/dev/hda7 swap swap defaults 0 0 5 qqqqq c q rqZZ
/dev/sdb1 /mnt/HLE_S-FLASH vfat pamconsole,exec,noauto,noatime,sync,iocharset=utf8,managed 0 0 /dev/sda5 /mnt/HLE2 ntfs pamconsole,exec,noauto,utf8,iocharset=utf8,managed 0 0 0
/dev/sda1 /mnt/HLE1 ntfs pamconsole,exec,noauto,utf8,iocharset=utf8,managed 0 0

figfighter 07-19-2005 11:39 PM

much of this is over my head, but i think i'm having the same problem.

even on other distros i've tried i can see the mounted hard drives and click on the little icons. can't with Mandriva. why?

mabalel 07-23-2005 05:11 AM

I suspect that it has something to do with the limited file access facilities in the Mandriva kernel, when it comes to accessing NTFS file systems. Any other ideas?

moises 07-25-2005 10:04 AM

I went in as root and right click>properties and gave read and write rights to user under permissions tab. The problem is that you have to do that with all files in the external hdd individually. If you only do this to the folders only, some of the files in them might not get changed for whatever reason.

Maldain 07-25-2005 03:16 PM

Love it when old UNIX solutions can fix a problem
 
To fix this you open a terminal either while logged in as root or you $ su -
to log into root from another user. Then cd to the directory above the partition's mount point eg:

# cd /mnt

Then issue a recursive chmod command to give read/write permissions to the files and subdirectories.

# chmod -R +r-w ./<mount point of your disk>

That should add read and write abilities for all users to all the files from your disk's mount point on down.

mabalel 07-28-2005 08:41 AM

Mounting external HDD as USER
 
I've tried issuing a recursive call - AND FAILED! I get a READ ONLY FILE SYSTEM error message. That explains it! NTFS is automatically mounted with RW rights to ROOT only. The question now is how do I mount/remount so I give RW ability to USER so I am able to view my files (like I can when I log in as ROOT) as USER?

Maldain 07-28-2005 01:53 PM

Try unmounting the drive changing the permissions on the mount point. If this is an nsf drive from another computer there are some nsf configs you'd need to do to resolve this issue. I can't remember them but when I dig out my notes on nsf i'll post more.

mabalel 01-19-2006 09:43 AM

I figured it out in the end! The problem was that my drive was being mounted as read only, which is why each time I tried to chmod (as root) file access rights the error was always "Cannot change file permissions. Read-only file system." If the filesystem is read-only, then obviously you can't write to it to change file permissions in the first place.

Anyway, I've since installed the latest PowerPack (Mandrake) version and that problem is now sorted.

tkedwards 01-19-2006 03:57 PM

Linux can't write to NTFS partitions, what partitions are did you get it working on?

mabalel 01-20-2006 03:08 AM

Thanks for the post. It was NTFS partitions actually. I didn't know Linux cannot write to these. The problem I was having was that it was mounting them as read-only. As user I was unable to access my external HDD, while trying chmod to change access rights as root failed. What could have been causing this?

tkedwards 01-20-2006 04:03 AM

Quote:

As user I was unable to access my external HDD
Since Linux can't understand Windows permissions it imposes its own permissions on the drive, these are set in the mount options in /etc/fstab. Usually it will default to root only access but you can either add the option umask=0 (or umask=0222 for read only) to give everyone access to the partition. Alternatively use the options uid=yourusername,gid=yourusername to give one particular user (as well as root) access to the partition.

Quote:

while trying chmod to change access rights as root failed
Probably because its read-only, not really sure how chmod is mean to interract with permissions set on drives using fstab options.


All times are GMT -5. The time now is 11:30 AM.