LinuxQuestions.org
Register a domain and help support LQ
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 01-29-2011, 05:05 PM   #1
dows
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
write access to a Windows partition folder from Linux (as root)


I want to copy a file from Linux to a separate Windows hpfs/ntfs
partition. I have mounted the windows partition on /mnt. Permissions
for /mnt and for files within /mnt show rwx for owner, and owner
as root. I am root. I get a message indicating I am not allowed
access.
I know there have been versions of this question asked before, but
either the replies do not cover my situation or they have not been
helpful.
How can I move ahead? Thanks!
 
Old 01-29-2011, 05:17 PM   #2
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
Exactly what command have you used to mount the partition? If this is done using /etc/fstab then copy that line into a reply here.

Also, what distribution are you using? You should always include this information when you ask a question.
 
Old 01-29-2011, 06:18 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It would be better to mount an NTFS partition using the uid, gid, fmask and dmask mount options so that you can write to it as a regular user. You would use sudo to mount it as root, but then copy files as a regular user. Make sure you have the ntfs-3g and fuse packages installed before proceeding. Make sure that the fuse kernel module is loaded.
 
Old 01-30-2011, 12:24 PM   #4
dows
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
To stress junkie and jschiwal
thanks for your replies. I'll respond to stress junkie in some detail and will have to work some more
before I feel comfortable with jschiwal's comments.

My Linux is Debian Lenny, loaded about a week ago, downloading from ftp.debian
Linux is on /dev/sdb1. I'm working as root in Linux.

My Windows XP Pro is on /dev/sda1.
fdisk shows /dev/sda1 as type 7 HPFS/NTFS
There is no reference to /dev/sda1 in fstab, and nothing mounted on /mnt.

I execute mount -t auto /dev/sda1 /mnt -o rw
cd /mnt
now I can read the Windows directory on /mnt. for both /mnt and the files within it both owner and group
are root, and permissions for user are rwx for directories and rw for files.

I execute cp /home/dave/jj .
and get the message " cp cannot create regular file './jj': permission denied.

as an aside...I execute cp ntldr /home/dave/ntldr and the copy works fine.

Perhaps "root" isn't always root? Can you help further so I can copy from Linux to Windows?
 
Old 02-01-2011, 02:01 PM   #5
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 288

Rep: Reputation: 70
Make sure your Windows partition really got mounted read-write.
After mounting use command mount again without any parameters.
It should show all mounted partitions and how they are mounted.

Code:
$ mount
/dev/sdb7 on / type ext3 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb1 on /boot type ext2 (rw)
/dev/sda1 on /mnt type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
 
Old 02-02-2011, 12:37 AM   #6
dows
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the suggestion, Gdejonge. I had done that already.

Further information that might be useful to know: The computer was loaded as follows using two fresh
scsi drives:
first: load Windows from the installation CD, letting Windows format its partition before loading
the operating system. Check that Windows is operating normally for an initial load.
second: Load Debian using first a bootable CD, then completing the load via ftp.debian. Linux
is loaded to a partition on the second hard drive, partitioning done by Linux.
finally: respond to the Debian installation sugggestion by letting Grub load on the expected boot record
of the Windows partition. This results in the boot-up option of either Linux or Windows. Both boot
correctly.

I still can't write to the Windows partition as root in Linux.

Someone have further comments/suggestions? Please!

Dave
 
  


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
[SOLVED] How to make a recovery partition windows like of my root folder[ubuntu] silvyus_06 Linux - Newbie 14 01-04-2011 02:53 PM
Having read/write access to some files in windows NTFS partition rahilrai Linux - Newbie 7 12-17-2005 01:02 PM
How can I write to a folder on my Windows partition? wfischer Linux - General 3 06-08-2005 08:37 AM
Write Access to windows partition TsuNamI Mandriva 8 04-03-2004 05:30 PM
no write access to windows partition fieke Linux - General 4 12-04-2003 09:12 AM


All times are GMT -5. The time now is 06:05 AM.

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