Enabling rwx permissions on my removable USB hard disk?
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Enabling rwx permissions on my removable USB hard disk?
Good afternoon folks,
I have a Freecom USB Network Drive, which is automatically mounted at /media/Network_Drive when I switch it on. I want to gain full access to this resource, but I don’t know how.
I tried changing the permissions using File Manager in Super User Mode, which gives me this error: Could not modify the ownership of file /blah/blah/blah You have insufficient access to the file to perform the change.
Surely I should be able to change the permissions as root? Please help!
What file system type is the drive formatted to? If it is fat32 or NTFS that will not work. SU mode should be able to change file and directory permissions.
What file system type is the drive formatted to? If it is fat32 or NTFS that will not work. SU mode should be able to change file and directory permissions.
Ahhh crap, yeah it's an NTFS. But I can read all the files, so surely I should be able to write and execute them aswell?
Linux mounts NTFS partitions as read only by default. You can force it to mount the partition as read write. Since this is automatically mounted when it is detected then you can use the remount option to change the mount characteristics (read only). You have to know the name of the raw device. It is probably /dev/sda1 but you can check it by reading the /proc/mounts file when the USB is plugged in and mounted.
You look for /media/Network_Drive in that list and see what the raw device is called. Then use that in the following instruction. In the following example I have used /dev/sda1 as the USB device.
Code:
root> mount -o remount,rw,gid=100 /dev/sda1 /media/Network_Drive
Now that you know the name of the raw device you can put an entry into /etc/fstab to mount the USB device as read write automatically.
Now having told you how to do that I should say that you will almost certainly regret taking this course. The NTFS file system driver for Linux is not reliable for writing to the file system. You will almost certainly corrupt the file system if you write to it frequently from Linux.
A better solution would be to put a file system on the USB device that can be reliably used by Linux. If the USB device needs to be used in both Linux and in Windows then I would format the USB device with the FAT32 file system. Linux can reliably write to that kind of file system. If you don't have to use the USB device with Windows then I would put a journaling file system on there such as XFS. I won't write instructions for that unless you say that you want to take that advise.
A better solution would be to put a file system on the USB device that can be reliably used by Linux. If the USB device needs to be used in both Linux and in Windows then I would format the USB device with the FAT32 file system. Linux can reliably write to that kind of file system. If you don't have to use the USB device with Windows then I would put a journaling file system on there such as XFS. I won't write instructions for that unless you say that you want to take that advise.
Is there anyway of doing this without deleting the data on the disk? I have about 100 gig on the USB hard drive and I can't write to it!
Is there anyway of doing this without deleting the data on the disk? I have about 100 gig on the USB hard drive and I can't write to it!
Yes, as long as you have some free space on the drive. Look to see how much of the drive is used, with files. As long as you have enough empty space to make the effort worth while, you can get a partitioning tool like Partition Magic, and shrink the esisting partition. That gives you free space.
You then make a new partition(s) as required, format with a linux supported file system Ie, reiser, ext2 , ext3 or the one of your choice. Make mount points, and mount the new file systems. Then you can copy any data to the new file systems you want linux to read and write to.
Make sure you back up your data on the NTFS first; you have been told.
Linux mounts NTFS partitions as read only ... Now having told you how to do that I should say that you will almost certainly regret taking this course. The NTFS file system driver for Linux is not reliable for writing to the file system. You will almost certainly corrupt the file system if you write to it frequently from Linux.
I'm using Novell SUSE 10.1. Does this OS have the same isses?
Quote:
Originally Posted by MikeEnz
Is there anyway of doing this without deleting the data on the disk? I have about 100 gig on the USB hard drive and I can't write to it!
There is no reliable NTFS driver yet ( for any linux distro ) to write to NTFS drives. There are some that do it, but come with warnings, and do not guarantee the results. Is it an 'issue' ? That is for you to decide. My intention is to dump windoze all together, and I knew in advance about NTFS. I still share a partition with w98 on my main machine, but it is fat32. That works very well and has never given my any problems.
NTFS is propriatory code, Bills boys wrote it, they own it. The drivers that exist are basically reverse engineered drivers. Fat32 is a much simpler file system and was part of DOS, long before IBM gave it away to Bill and the boys.
Okay, I've taken stress_junkie's advice and formatted the disk into several smaller 32 GB FAT partitions, but I have a new problem:
What should I put in /etc/fstab to allow normal users full rwx access to this partition? I tried the following otions and neither of these worked for me:
Here is what works on my system with vfat partitions. These two partitions mount at boot time and regular users have full access. The lines are from my /etc/fstab file.
If you copy a line, you will need to edit the /dev/hdxx part, and the mount point for your file system. That should be it. Also make sure your mount point exists before you try to mount the partitions. You need to use mkdir if they don't exist first.
I glad it worked for you. I went through a long learning curve, like most first time linux users, about 3 years ago. I found a thread on this board when I was figuring out how to mount a partition. I copied the options from there. Since then I spent some time reading the man pages ( boring I know ). Since then fstab is no longer either a mystery or difficult to figure out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.