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