LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 09-22-2006, 10:41 AM   #1
mejpark
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Rep: Reputation: 0
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!

Many Thanks,

mejpark
 
Old 09-22-2006, 10:54 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
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.
 
Old 09-23-2006, 09:00 AM   #3
mejpark
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camorri
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?

The mind boggles
 
Old 09-23-2006, 09:19 AM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
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.
Code:
root> cat /proc/mounts
rootfs / rootfs rw 0 0
udev /dev tmpfs rw 0 0
/dev/hda1 / reiserfs rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
...
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.
Code:
/dev/sda1    /media/Network_Drive    ntfs    rw,gid=100    0  0
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.
 
Old 09-24-2006, 04:14 AM   #5
MikeEnz
LQ Newbie
 
Registered: Sep 2006
Location: Auckland, New Zealand
Distribution: Novell Suse 10
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie
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!
 
Old 09-24-2006, 06:12 AM   #6
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
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.
 
Old 09-27-2006, 09:22 AM   #7
mejpark
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie
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!
Here, here! Mine has a capacity of 250 gigs!

mejpark
 
Old 09-27-2006, 10:39 AM   #8
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
mejpark,

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.
 
Old 10-06-2006, 07:13 AM   #9
mejpark
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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:

1st try:
/dev/hdb1 /mnt/projects vfat defaults 0 0
2nd try:
/dev/hdb1 /mnt/prpojects vfat noauto 0 0

I also tried changing the owner from root to michael like so:

# su -
# chown -R michael /mnt/projects
Operation not permitted.

please help me!

Thanks in advance.
 
Old 10-06-2006, 09:05 AM   #10
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
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.

Code:
/dev/hda1 /mnt/win_c vfat umask=0,iocharset=iso8859-15,codepage=850 0 0
/dev/hda5 /mnt/win_d vfat umask=0,iocharset=iso8859-15,codepage=850 0 0
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.

Let us know how it goes.

Last edited by camorri; 10-06-2006 at 09:08 AM.
 
Old 10-10-2006, 11:07 AM   #11
mejpark
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Original Poster
Rep: Reputation: 0
That's great camorri (it worked like a charm)... Just out of interest, where did you find out the appropriate options to use?

Thanks again
 
Old 10-10-2006, 01:08 PM   #12
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM
USB Removable Disk Autorun Dr. Bush Linux - Hardware 2 07-31-2005 02:10 PM
enabling DMA for hard disk jogurt666 Linux - Hardware 1 08-12-2004 02:44 AM
LAN backup to a removable hard disk chakkerz Linux - Networking 3 12-16-2003 06:11 PM
Enabling DMA on an IDE Hard Disk paulo2k Slackware 7 09-09-2003 01:58 PM


All times are GMT -5. The time now is 11:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration