Can't Write to External Drive From User Account

Glen Strom gstrom-R6A+fiHC8nRWk0Htik3J/w at public.gmane.org
Wed Feb 28 01:07:57 UTC 2007


On 27 Feb 2007 13:33:59 -0500
Tim Writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org> wrote:

> Glen Strom <gstrom-R6A+fiHC8nRWk0Htik3J/w at public.gmane.org> writes:
> 
> > On Tue, 27 Feb 2007 09:56:36 -0500
> > lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org (Lennart Sorensen) wrote:
> > 
> > > On Mon, Feb 26, 2007 at 05:28:14PM -0500, Glen Strom wrote:
> > > > drwxr-xr-x  2 root root 4096 2007-02-22 21:42 /mnt/usbdrive1
> > > > 
> > > > drwxr-xr-x  3 root root 4096 2007-02-25 23:28 /mnt/usbdrive2
> > > 
> > > So only root has write access, and everyone else can read.
> > > Nothing chmod and chown can't deal with.
> > > 
> > I tried the following combinations--none work.
> > 
> > rwx rwx rwx root root
> > rwx rwx rwx root disk
> > rwx rwx rwx root users
> > rwx rwx rwx <user account> users
> 
> On the mount point with or without the drive mounted?
> 
> If you chown/chmod the mount point without the drive mounted, it is
> overwritten (by the ownership and permissions of root of the mounted
> file system) when it is mounted. You must chown/chmod the mount point
> after it is mounted.
> 
> Of course, the file system must support permissions and ownership. If
> it's a FAT file system, for example, this won't work. If it's a
> native Linux file system (ext2, ext3, xfs, jfs, etc.), it will be
> fine.
> 
I thought I must have forgotten something. It is an ext3 file system,
and I was changing the permissions without first mounting the drive.
After I mounted it, the change worked, but not without an unexpected
side effect (unexpected by me, anyway).

When I first changed the permissions, I removed the executable flag
because the drive is for backup purposes only:

rw- rw- r-- root disk

I could not access /mnt/usbdrive1 from my user account. It would only
work when I included the executable flag for both root and group.

rwx rwx r-- root disk

I don't know why that is, but anyway, everything seems to work ok now.




-- 
Glen Strom
gstrom-R6A+fiHC8nRWk0Htik3J/w at public.gmane.org
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list