LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't create files in windows partition. (http://www.linuxquestions.org/questions/linux-newbie-8/cant-create-files-in-windows-partition-784788/)

korbes 01-26-2010 03:48 AM

can't create files in windows partition.
 
Hi,
I have Suse 11.2 installed. In Dolphin file manager I can see read files in my windows partition.
But I cant create or delete any of these files as a user.
I opened Dolphin as root and changed the permission rights of this windows folder so that all groups and users can view and Modify content. But when I try to create something I get the message access denied, "check your permission rights".
What am I doing wrong?
And how can I change these permission right for my user in console mode?
Maybe that will work?
Thanks in advance.

vrmartin2 01-26-2010 05:24 AM

What type of file system is your windows partition? If it's NTFS, it will be read-only.

r3sistance 01-26-2010 05:52 AM

I suspect you do not have the fuse ntfs-3g drivers what are required for writing to an NTFS partition. These drivers should be available off of rpmforge but I am not certain about how their installation goes on Suse.

i92guboj 01-26-2010 08:23 AM

Please, open a terminal, type this command and paste the output here:

Code:

mount
This will tell us what type of partition you are using, and whether it's mounted via fuse (and hence using ntfs-3g) or the regular in-kernel ntfs driver. It's the first step before proceeding any further.

korbes 01-26-2010 08:24 AM

OK,
Now I have installed ntfs-3g and in 'system info' I can see that the filesystem of my windows partitions are called now "ntfs-3g".
but I still can't write to them?
Do I have to still activate ntfs-3g or something?
please help.

korbes 01-26-2010 08:26 AM

Quote:

Originally Posted by i92guboj (Post 3840978)
Please, open a terminal, type this command and paste the output here:

Code:

mount
This will tell us what type of partition you are using, and whether it's mounted via fuse (and hence using ntfs-3g) or the regular in-kernel ntfs driver. It's the first step before proceeding any further.

Ok this is the outcome of the command 'mount':
Code:

korbes@linux-b8pz:~> mount
/dev/sda6 on / type ext4 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda7 on /home type ext4 (rw,acl,user_xattr)
/dev/sda1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /windows/D type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb1 on /windows/E type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/sdb1 on /mnt/windows type fuseblk (rw,allow_other,blksize=4096)
korbes@linux-b8pz:~>


i92guboj 01-26-2010 08:29 AM

Code:

/dev/sda1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /windows/D type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb1 on /windows/E type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)

This means that now your drives are using ntfs-3g, and they are mounted with the "rw" option (read/write), so they should be writable. Did you try to "touch" a new file as root on the said drives? For example:

Code:

touch /windows/C/foo
Should create an empty file called "foo" inside /windows/C/. Do it as the root user, so you can make sure that it's not a permissions issue, and see if it works.

ongte 01-26-2010 08:53 AM

Not familiar with Suse, so I'm not sure what default_permissions means. But this definitely is a permission problem. Can you show us your fstab?
Quote:

# cat /etc/fstab
You might need to specify a umask here.

Also might help showing us the permission in the Windows partition.
Quote:

# ls -l /windows/C

vrmartin2 01-26-2010 08:56 AM

And normally I would not be trying to write to the root of any file system. I'd try writing to some sub directory.

ALSO: ls -ld /windows/C would be helpful too. That would show the permissions on the top level directory (what I'm calling the root of the file system).

i92guboj 01-26-2010 09:11 AM

Quote:

Originally Posted by ongte (Post 3841003)
Not familiar with Suse, so I'm not sure what default_permissions means.

Well, the distro is nothing to do here. The mount options relate only to either the mount command itself or the chosen driver. In this case, this is ntfs-3g specific, so it's the ntfs-3g man page what you need to look at.

Setting an umask might help, setting the UID and GID as mount options might as well. I have not that much experience with Windows stuff these days so I can't really be sure.


Quote:

Originally Posted by vrmartin2 (Post 3841009)
And normally I would not be trying to write to the root of any file system. I'd try writing to some sub directory.

Any particular reason? The root directory is not special in this regard, as long as you don't go randomly overwriting system files without any care.

Quote:

ALSO: ls -ld /windows/C would be helpful too. That would show the permissions on the top level directory (what I'm calling the root of the file system).
Note however that permissions might be completely emulated at mount time. At least this is what VFAT does (the FAT fs can't store the permissions, simple as that), I am not sure at all how ntfs-3g handles the things though I know that NTFS can handle ownerships and permissions. Reading this might help with this issue:

http://pagesperso-orange.fr/b.andre/permissions.html

The key point is to understand how this works in conjunction with umask, gid and uid.

vrmartin2 01-26-2010 09:50 AM

The root directory in all systems should be treated as special, meiner Meinung nach (imho). I don't like anyone but root to write to the top most directories of a partition and when I create immediate sub dirs I create them with root and then assign them to some standard user. And in windows in particular, over the years, they have tried to make the root directory special (especially the C drive) to avoid attacks. It's good practice, and I'd be surprised if the windows system isn't trying to enforce extra restrictions on the top level directory.

vrmartin2 01-26-2010 09:51 AM

AND YES: VFAT is another story. It's wide open, but not NTFS.

jschiwal 01-26-2010 09:57 AM

You can configure how your NTFS partitions are mounted in YaST2's Disk module.

You can also edit your /etc/fstab file and add the "uid=<yourusername>,gid=<yourusername>". Also use the "dmask=" option and "fmask=" option to control the permissions.

Here is an example:
Code:

/dev/disk/by-id/ata-TOSHIBA_MK2049GSY_48CYT01OT-part1 /windows/C          ntfs-3g    users,noauto,uid=korbis,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
Because the NTFS filesystem doesn't use Linux permissions, you need to determine that when you mount it. All files and all directories will have the same permissions after mounting.

slightlystoopid 01-26-2010 10:10 AM

setting uid and umask appropriately is essential to mount rw on ntfs.

My fstab entry looks like this:

Code:

UUID=62AC6C71AC6C41A1 /home/jschmidt/windows ntfs user,noauto,allow_other,uid=1000,gid=100,umask=22,noatime 0 2
aside: I've yet to get user mount privileges working on an ntfs-3g device, but once it's sudo mounted, you can certainly write so long as uid and umask are correct.

EDIT: jschiwal beat me :(

vrmartin2 01-26-2010 01:40 PM

Samba
 
And if this happens to be a network drive (it's more likely something on your local system), Samba is much easier than all of this.


All times are GMT -5. The time now is 03:51 AM.