LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2006, 10:43 PM   #1
Ekuliak
LQ Newbie
 
Registered: Jan 2006
Distribution: Mandriva 2006
Posts: 24

Rep: Reputation: 15
Need help with hard disk permissions


I recently stole 25 gigs from my windows drive and made a new partition. My intent is to use that 25 gigs as a storage place for files to use on whatever OS I'm running at the time.

I wanted it mostly for media. And I mounted it as /media. It seems to have mounted fine. I can't access the partition though (permissions show that other users are forbidden). I want the permissions to be set so everybody has read and write permissions for it. I am running Mandriva 2006.

How do I give permissions for all users?

Here is what my /etc/fstab file says:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/sda1 / ext3 defaults 1 1
/dev/sda6 /home ext3 defaults 1 2
/dev/sdb5 /media ntfs defaults 0 0
/dev/hda /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/sdb1 /mnt/win_c2 ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/sda5 swap swap defaults 0 0
 
Old 02-08-2006, 10:51 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
You can try changing the mount line from:
Code:
/dev/sdb5 /media ntfs defaults 0 0
to
Code:
/dev/sdb5 /media ntfs users,umask=0000 0 0
That will allow everyone to see the files and ordinary users can mount/unmount the file system. Write access for NTFS needs to be compiled into the kernel. I've never used write access to NTFS from Linux since there are heaps of sites pointing out the risks - be sure that your data is backed up before you attempt something like this.
 
Old 02-08-2006, 11:41 PM   #3
Ekuliak
LQ Newbie
 
Registered: Jan 2006
Distribution: Mandriva 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Cool, thanks, now I have read access.

I don't understand what you meant by all the write stuff. I don't know how to compile something into the kernel.


Would I just be better off using a different format that windows recognizes? It was set to NTFS as default (I made the partition from windows). I'm ok with changing the format of the drive if it's easier to get it to work the way I want. There's really nothing on there right now anyways. I just need one that windows and linux both recognize (and give read/write access).
 
Old 02-09-2006, 01:53 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
vfat (fat 32) is recognised by linux and windows in read and write modes. I'd recommend that if it's only for data files.

If you're OK with converting the data partition to fat32, you'd mount it under Linux with:
Code:
/dev/sdb5 /media vfat users,umask=0000 0 0
You may need the uid/gid options - let us know if the above doesn't work.

Last edited by gilead; 02-09-2006 at 04:48 AM.
 
Old 02-09-2006, 10:59 PM   #5
Ekuliak
LQ Newbie
 
Registered: Jan 2006
Distribution: Mandriva 2006
Posts: 24

Original Poster
Rep: Reputation: 15
I changed to vfat. Other users only have read permissions still.

I guess that means I need uid/gid options... What are they?
 
Old 02-09-2006, 11:26 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
To give a specific user ownership of the files, use uid=value or to give ownership to an entire group use gid=value, where value is the id from /etc/passwd for uid and /etc/group for gid.

As an example, if your username was ekuliak you'd get your uid from /etc/passwd with grep '^ekuliak' /etc/passwd | cut -d: -f 3. If the group you wanted to give ownership was users, you'd get the gid from /etc/group with grep '^users' /etc/group | cut -d: -f 3. if the uid was 1000 and the gid was 100, the line from before would then become:
Code:
/dev/sdb5 /media vfat rw,uid=1000,gid=100,users,umask=0000 0 0
At least, I hope that works
 
Old 02-10-2006, 04:55 PM   #7
Ekuliak
LQ Newbie
 
Registered: Jan 2006
Distribution: Mandriva 2006
Posts: 24

Original Poster
Rep: Reputation: 15
That seemed to do it.

Thanks a lot!
 
  


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
Cloning 1 hard disk to smaller hard disk, dd or ghost? fireman949 Linux - Hardware 8 12-23-2012 01:51 AM
Reiser file system / Hard Disk/ Hard Drive Problems Oxyacetylene Linux - Software 4 10-10-2005 03:24 PM
Reclaim disk partition from hard disk installation EStester Linux - Enterprise 2 03-09-2005 12:46 PM
Reclaim disk partition from hard disk installation EStester Linux - General 1 03-09-2005 12:25 PM
Hard Disk question - Making a big hard disk MrAnonym Linux - General 2 09-15-2003 07:08 PM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration