LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   chmod to access win partition from user account (https://www.linuxquestions.org/questions/suse-opensuse-60/chmod-to-access-win-partition-from-user-account-394445/)

danieljames 12-19-2005 06:32 AM

chmod to access win partition from user account
 
I have entered command

chmod -R o+w+r /mnt/windows

to change permissions to allow users to access the windows partition.
It ran recursivly for a good while but each file showed a message saying that the change was unsuccessful. Still no access to win partition unless logged in as root.

I used to get access to root stuff in Mandrake without logging out by opening console session, changing to su and opening nautilus or konqueror (being commandline challenged) however SuSE does not let me do this either.

I do not use windows myself so have not needed this but I have been getting others onto Linux and they are not so ready to abandon the start button. Is this a limitation of SuSE's that only root can access Windows? Other distros seem not to limit access to windows to root anyway.

What have I done wrong?

............................................

UK MAdMaN 12-19-2005 07:20 AM

I'm guessing you've installed it by removing Mandriva during the install. There's a particular quirk of SUSE where it doesn't allow users access to a drive after installation if it had a modified boot record. What I did to solve this was to "repair" the boot loader using the recovery console on the Windows CD, then reinstall SUSE. Can't help with the chmod command, as I couldn't get access using the command.

danieljames 12-19-2005 07:58 AM

thanks for a fast reply. There is no problem with the boot loader though. Everyone can access the windows operating system from grub but no dual booters can access the windows partition from SuSE 9.3

One system I moved windows over 5GB by 'resizing' and added a 6GB hdd for /home.
On one system I found an unused partition and installed SuSE there.
One system I installed Linux and then Windows on the first partition on a freshly formated drive.

These are the only dual boot Suse/Windows systems I have installed. The rest have been Mandrake 10.1 or Ubuntu without user access problems. I have been using SuSE because it includes Real, Adobe, Flashplugin ect. and this saves me setup time.

If I could show them how to open a Nautilus or Konqueror browser with console or Konsole from su then there would be no problem but this seems to not be possible with suse either.

biophysics 12-20-2005 08:24 AM

Quote:

chmod -R o+w+r /mnt/windows
Pl dont issue such commands on a mounted partition. I am not sure what kind of damage it might cause to windows OS

I suspect that the problem here is that the mount _points_: /mnt and /mnt/windows have wrong permissions (not the partition)

please paste your /etc/fstab
$ ls -l /mnt
$ ls -l /

danieljames 12-20-2005 05:53 PM

Thank you so much biophysics for writing in with the 'heads-up!' I am fortunate it didnt allow and it all seems to still work then. OOOpz

I am not really sure about exactly what you mean but I am off to read the tutorials on fstab. I am sure it will make more sense then.

thanks again, ill write back when I have done my homework.

danieljames 12-20-2005 10:46 PM

I suspect that the problem here is that the mount _points_: /mnt and /mnt/windows have wrong permissions (not the partition)

please paste your /etc/fstab
$ ls -l /mnt
$ ls -l /[/QUOTE]

Sorry, Im lost. I have read some stuff on the fstab but have not found anything about this command in the file. Where do you mean for me to put it in and do you mean for me to use the $ symbol.

I have used the command to give me the permmission notes for a list of directory contents using a terminal like console and just writen as 'ls' to see if I get access but to no avail.

I not put anything into fstab yet but have changed the permissions on /mnt/windows to read and write. but the files inside are still unreadable when loged in as something other than root.

Ihave attempted to change files and folders in /mnt/windows to give r+w permissions to users but it says that I do not have the permission to make such a change.

I am certain this is not an isolated problem as I have the same issue with every SuSE system that dual boots with windows.

I would be intested to know if other people with SuSE have the same access problem

crazibri 12-20-2005 11:06 PM

I've had Suse since 9.0 and currently have Suse 10.0 installed. I've installed many Suse versions w/ dual boot to windows. I even got my dad to try out Suse. I havent had any problems with access to the Windows partitions. I have a few questions for you since you have not posted this information...

1.) What filesystem is the windows using? Fat32? NTFS?

2.) What is the partition? HDA1? HDB1? HDA2?

3.) Could you please go to command shell as root and type "mount" and paste it here?

4.) Could you please go to command shell as root and type "ls -l /mnt"?

I think this information will help all of us try to solve your problem.

Oh and by the way if you're doing a CHMOD on a Windows NTFS partition, chances are it wont work because Suse default mounts NTFS read-only. It probably wont work on Fat32 either since I've found that executing a Unix program on a non-ext partition causes wierd errors.

biophysics 12-22-2005 12:01 PM

As the previous post says: "danieljames" pl. post "using a terminal like console" type as root (each line is different command):

ls -l /mnt
ls -l /mnt/windows
cat /etc/fstab
mount

Unless we get this info I am afraid we cant help much.

ramen 12-22-2005 12:36 PM

This is to allow users to access my windows partition, i use the option umask=0 hope this helps

/dev/hda1 /mnt/windows ntfs nls=utf8,umask=0 0 0

Remember to umount and remount for the changes to take effect.

abisko00 12-22-2005 12:41 PM

I have a guess here:

As FAT32 does not know anything about user-permissions, these have to be defined globally in /etc/fstab (the file where all the mount option are defined). A typical fstab-line starts with the device to be mounted (/dev/hdxy), then the mountpoint (/mnt/windows), the filesystem (vfat) and a list of options (typically only 'default'), then two digits (mostly '0 0'). To allow other users than root access to the windows partition, you can append the 'default' option by the following parameter (comma separated): 'umask=000'. This will set full permissions for all users. You may also want to add 'users', to allow a user to mount and unmount the drive. So, at the end it could look like this:

Code:

/dev/hd<something>  /mnt/windows  vfat  defaults,users,umask=000  0 0
These changes have to be made with root permissions. If you are not familiar with the command line, I suggest the following procedure:

- open the KDE menu
- select 'Run Command'
- type 'kdesu kwrite /etc/fstab'
- enter the root password when asked
- make the changes and save
- reboot

EDIT: Seems I was too late ;) Why did I need so many more words to say the same? :D

EDIT2: One more thing: If your Windows-filesystem is NTFS, forget about the writing anyway. Writing is not possible on NTFS with native Linux tools. Have a look at captive-ntfs, if you really want to.

ghight 12-22-2005 02:24 PM

As has been stated before, don't chmod windows partitions!

Secondly, make sure the users that require access to the partition are in the USERS group. Only this groups has access to the /windows partition.

mac57 12-22-2005 05:14 PM

Folks, there are two solutions to this problem. The most obvious is the fstab route. Here is the line I have in my fstab for my /windows/C, and I have full read write access to it as a result. However, I may also have done the second one afterwards, which is why I will post both.

First, the fstab line:

/dev/hda1 /windows/C vfat noauto,rw,user,users,gid=users,umask=0000,showexec,quiet,utf8=true 0 0

This should all be on one line. The key items here are "rw" (give rw access), "gid=users" (sets the default group to "users", of which you should be a member), and umask=0000 (sets all permissions).

Now, when I mount /windows/C, I have full access.

Secondly, I have determined by trial and error that SuSE seems to make ALL newly mounted partitions (for example, and external firewire drive) write accessible only to root, for reasons I could never work out (and for which fstab entries never seemed to do the trick). However, one of the kind denizens of one of these newsgroups pointed out to me that if, as root, I issued the following when the partition was mounted, all would be well forever more (even after it had been unmounted and remounted). The magic command?

chown your_userid: /mnt/new_partition

As an example, if you userid is "bob", and the partition in question is hda4, the command would be:

chown bob: /mnt/hda4

This has always worked for me. I hope that this helps!

danieljames 12-27-2005 04:15 AM

thanks for all the ideas

File system has been both NTFS and FAT on various systems. I was using NTFS for the system partition and FAT where I was trying to make shared partitions for files used in both operating systems. Strangly the FAT partition comes up with every file and folder being the property of root also, except users can view only by default and I was able to change the mode to give write permission to 'others' But for C: . . . no access and no possiblity for change using normal tools. I will go try the fstab suggestion made above when I can get to these machines tommorrow.

I always put the system partition for windows on hda1, and it is the system partition that I have the trouble with, moreso than extra FAT shared partitions.'

the other questions I will answer tommorow. I dont have windows on my PC and I am just trying to help solve access problems for all the people I have insalled dual boots for. None of the six SuSE users can access windows partition without logging in as root. All four Mandriva using families access fine, although, without write of course.

Jongi 12-29-2005 04:00 AM

I think if you do

Code:

YaST --> System --> Partitioner --> Click Partition --> fstab options --> Mountable by user
That might solve the problem as well.

danieljames 01-09-2006 04:45 PM

Logged in as root, I applied the fstab changes suggested. The line I used shown below. Even with this line change I can not see the contents of the /mnt/windows directory (hda1) unless logged in as root. I used the wording of the fstab line as suggested by mac57. After posting this I intend to also try raman's variation. I have also tested and found the problem occurs also in SuSE 10.

in response to biophysics's request for me to enter the commands

ls -l /mnt
ls -l /mnt/windows
cat /etc/fstab
mount

data as follows . . .

________________________________________

linux:~ # ls -l /mnt
total 5
drwxr-xr-x 4 root root 96 Sep 10 02:27 .
drwxr-xr-x 21 root root 488 Jan 10 2006 ..
drwxrwxrwx 4 root users 4096 Jan 1 1970 car_boot
drwxr-xr-x 2 root root 48 Jan 8 10:36 windows
linux:~ # ls -l /mnt/windows
total 0
drwxr-xr-x 2 root root 48 Jan 8 10:36 .
drwxr-xr-x 4 root root 96 Sep 10 02:27 ..
linux:~ # cat /etc/fstab
/dev/hda2 / reiserfs acl,user_xattr 1 1
/dev/hdb1 /mnt/car_boot vfat noauto,rw,user,users,gid=users,umask=0000,showexec,quiet,utf8=true 0 0
/dev/hda1 /mnt/windows ntfs noauto,rw,user,users,gid=users,umask=0000,showexec,quiet,utf8=true 0 0
/dev/hda3 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/dvd /media/dvd subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/cdrecorder /media/cdrecorder subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0
linux:~ # mount
/dev/hda2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid)/dev/hdd on /media/cdrecorder type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8)
/dev/hdb1 on /mnt/car_boot type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0000,showexec,quiet,utf8=true)
linux:~ #

____________________________

the lines for hdb1 an hda1 were both "defaults 0 0" before change.


thanks for your help


All times are GMT -5. The time now is 10:56 PM.