LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-30-2008, 09:58 AM   #1
Mutch
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Rep: Reputation: 15
Unhappy Hard Drive Write Access Problems. Chmod not Working.


Hi!

I have just installed Clarkconnect 4.3 to be my home server. It has a 750gig hard drive which i am trying to share and mount to /media.

I have it sharing fine but i can't get write access to the drive. when i do
chmod -R 777 /media
as root, the permissions change to drwxr-xr-x . I can't seem to figure out why?

Thanks in advance.
 
Old 08-30-2008, 01:52 PM   #2
cyclepathology
LQ Newbie
 
Registered: Sep 2007
Location: Seattle, WA
Distribution: Red Hat, Ubuntu, PCLinuxOS, Fedora, Vector Linux, CentOS, HP-UX, Solaris, AIX, FreeBSD
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by Mutch View Post
Hi!

I have just installed Clarkconnect 4.3 to be my home server. It has a 750gig hard drive which i am trying to share and mount to /media.

I have it sharing fine but i can't get write access to the drive. when i do
chmod -R 777 /media
as root, the permissions change to drwxr-xr-x . I can't seem to figure out why?

Thanks in advance.
You've got a 750 GB drive. Did you partition it? Did you put a file system on it? What kind of file system did you use? Did you mount the file system? How?
 
Old 08-30-2008, 06:42 PM   #3
Mutch
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by cyclepathology View Post
You've got a 750 GB drive. Did you partition it? Did you put a file system on it? What kind of file system did you use? Did you mount the file system? How?
I used one big Fat32 partition for the whole drive.
And its mounted at /media.
 
Old 08-30-2008, 06:47 PM   #4
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
You say you tried to share it. How did you do it?
 
Old 08-30-2008, 06:50 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You can't use chmod or chown on a fat32 filesystem. The filesystem doesn't save Linux permissions. Since you have it mounted on /media/, is it automounted? An option in properties for the drive icon (in kde at least) will allow you to change how a device is mounted.

If not, use the "uid", "gid", "dmask" and "fmask" mount options to change the permissions en mass when the device is mounted. See the man mount page.

--
For a Linux filesystem, if you are using Samba, then also check the smb.conf file and its share definition.
If this is a globally writable file, and you see a line in the Global section like:
map to guest = Bad User

and a line in the service defintion like:
usershare allow guests = Yes

then make sure that the user "nobody" has access to the directory.

If you use "Security = User" instead, then create a user account for each Windows user and use "sudo /usr/bin/smbpasswd -a <USERNAME>" to add a samba user and the user's password. Also check the permissions on the server's directory being shared. To allow each user to write to the share, but protect a file from being deleted by a non-owner, then set the sticky bit on the directory.
For example,
sudo mkdir /usr/srv/music
sudo chown root.root /srv/samba/music
sudo chmod a=rwxt /srv/samba/music

It is up to the file owner whether they want to make a file read only protecting it from being overwritten or modified.

More information and countless variations can be found in the "Samba 3 by Example" and "Samba 3 HOWTO & Reference" from the samba-doc package or from their web site.

--

If you are sharing an external drive, reformatting it in a Linux native filesystem will allow more granular user & permissions control.

Last edited by jschiwal; 08-30-2008 at 07:02 PM.
 
Old 08-30-2008, 08:39 PM   #6
Mutch
LQ Newbie
 
Registered: Oct 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
You can't use chmod or chown on a fat32 filesystem. The filesystem doesn't save Linux permissions. Since you have it mounted on /media/, is it automounted? An option in properties for the drive icon (in kde at least) will allow you to change how a device is mounted.

If not, use the "uid", "gid", "dmask" and "fmask" mount options to change the permissions en mass when the device is mounted. See the man mount page.
This answered my question! Thanks!

I added umask=000 to fstab and that made everything work!

Last edited by Mutch; 08-30-2008 at 08:40 PM. Reason: typo
 
  


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
How to access Access root(/) hard drive attached in Windows XP machine farrukhndm Linux - Software 2 07-29-2008 01:52 PM
Mounting a hard drive so that a normal user get write access raghesh Linux - General 4 08-24-2007 01:26 AM
Working hard drive - Linux still trying to write to old partitions live_dont_exist Linux - Hardware 4 01-29-2007 01:30 AM
Problems with getting external USB hard drive working pwaring Linux - Hardware 10 12-08-2005 08:53 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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