LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-04-2002, 10:57 AM   #1
hamsterdude
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.2
Posts: 62

Rep: Reputation: 15
Windows HD, can't write/edit as user


here's my fstab line for my windows HD . . .

/dev/hda1 /mnt/windows vfat user,dev,suid,exec,defaults 0 0

what changes should I make so that I (as a bog standard user) can write and edit files on this drive?

Any help would be great
 
Old 07-04-2002, 11:01 AM   #2
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
hmmm, if I correctly recall, that is the only downside to accessing your Windows partition from Linux...you can bring files over from Windows to Linux partition but you cannot copy files onto the Windows partition...it gives a privileges error...but it just does that cuz it can't copy the file to that partition...it's unable to do it.
 
Old 07-04-2002, 11:02 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
insert "umask=000" to the options
 
Old 07-04-2002, 11:03 AM   #4
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
is it really that easy acid?
and with that, you can copy to the Windows partition from the Linux partition?
 
Old 07-04-2002, 11:06 AM   #5
hamsterdude
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.2
Posts: 62

Original Poster
Rep: Reputation: 15
fair enough, thanks anyway
 
Old 07-04-2002, 11:09 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
zLinuxz, i'm afraid you don't recall correctly...
 
Old 07-04-2002, 10:01 PM   #7
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
yeah, I can easily not recall something correctly or incorrectly, thus I ask like I did, is that all you need to add that "umask=000"
and then you'll be able to copy from linux partition to the windows partition?
 
Old 07-05-2002, 12:43 AM   #8
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
The umask solution is fine, but better is to specify the missing attributes (which the file system doesn't have) in the fstab file. Look up your gid/uid numbers (type id <yourusername> or look it up from the passwd file), say you get 100, 102, then make the entry

Code:
/dev/hda1 /mnt/windows vfat  rw,gid=100,uid=102,noexec,umask=022 0 0
That specifies that your system assumes that all files on there are owned by you. Better than 000, the mask 022 turns off the write permission for group and others. Also, take out dev, suid, exec (and change to noexec). I'm not sure that you can actually have any device special files or files with the suid bit on a vfat filesystem, but in any case, this is safer. The noexec attribute prevents any executables from being started from the filesystem, which usually makes sense and increases your security - someone could upload a Linux executable on there while in Win mode, in this way it cannot be started unless you copy it to a regular file system.

Hope it helps,

Martin
 
Old 07-05-2002, 06:48 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
oh yeah, that's a bit more secure, but then if you want more than two users you're back to square one pretty much. presumably the exec/noexec is totally irrelevant as you can never run stuff from a vfat partition..? you could always just set the umask to 644 then...?
 
Old 07-05-2002, 06:49 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
arse, not 644, 133 of course
 
Old 07-05-2002, 08:35 AM   #11
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
What about mounting as umsdos?
mount -t umsdos /dev/windrive /what_ever_mount_point_you_ want

At lest it works on slack, and the only error I get is
about permission which of course Win/DOS would support
 
Old 07-05-2002, 11:30 AM   #12
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
Quote:
oh yeah, that's a bit more secure, but then if you want more than two users you're back to square one pretty much. presumably the exec/noexec is totally irrelevant as you can never run stuff from a vfat partition..?
Not true, you can. Watch my "hello world":

Code:
 $ ./hello
hello world
$ mount | grep win98 
/dev/hda1 on /win98 type vfat (rw,gid=100,uid=102,umask=022)
$ cp hello /win98/
$ /win98/hello
hello world
$
I guess you mean that you obviously cannot run a Win exe here, but you (or some bad guy while you are booted in Windows and protections are low) can store a Linux executable or executable scripts in your vfat partition. You squash them with the noexec.

Martin
 
Old 07-05-2002, 11:34 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
i think i was thinking about trying to set exectuable bits on a vfat file. that's where i went askew, cos my umask doesn't include the x bit, so you'd need to set it, which obviously you can't.
 
Old 07-06-2002, 10:24 PM   #14
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
cool, thanks mpl68
 
Old 07-07-2002, 07:54 AM   #15
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
mount <windows partition> <mount point>

This works for me.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Write/Edit files on hd.. Mmc245 Linux - Hardware 3 07-03-2005 07:08 PM
write to windows fat partition as regular user feetyouwell Linux - Software 2 09-11-2004 04:07 AM
cannot edit file as root with write permissions set? Mishley Red Hat 4 08-05-2004 01:23 PM
Pleasehelp with proftpd.conf - trying to config user to write files as other user. philg Linux - Software 1 06-21-2003 01:13 PM
cannot write to windows share as user keirobyn Linux - Networking 3 01-23-2003 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:35 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