LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unlock a locked folder in Suse 10.0 (https://www.linuxquestions.org/questions/linux-newbie-8/unlock-a-locked-folder-in-suse-10-0-a-381667/)

dcg757s 11-09-2005 11:44 PM

unlock a locked folder in Suse 10.0
 
I just mounted ntfs partitions shown below.
gibby@linux:~> mount
/dev/hda3 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)
/dev/sda1 on /windows/c type ntfs (ro,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /windows/d type ntfs (ro)

now i can't access them. it is saying i don't have permission.
and their folders are locked.

any other info needed, I will be glad to post.

b0uncer 11-09-2005 11:56 PM

Quote:

/dev/sda1 on /windows/c type ntfs (ro,noexec,nosuid,nodev)
why noexec, nosuid, nodev? I'm not an ntfs-guru but sounds odd to me..also, I'd use "users" as an option, so others than the mounter (who might be root) can do stuff with the mounted partitions, like

/dev/sda1 on /windows/c type ntfs (users,exec)

or so..that locked-thing sounds to me, that you have mounted the partitions as some other user (say, as root) and then try to access them as some other (normal) user, who doesn't have even read permissions.

tkedwards 11-10-2005 12:10 AM

Quote:

why noexec, nosuid, nodev? I'm not an ntfs-guru but sounds odd to me
Seems perfectly normal - NTFS can't have character or block devices so nodev stops any files being interpreted as such, same with setuid - NTFS has no such thing and unless you're using WINE to execute Windows apps there's no harm in noexec as well (noexec is a good default on all mounted file systems besides root for security reasons).

Quote:

/dev/sda1 on /windows/c type ntfs (users,exec)
Don't remove the 'ro' (read only) option from NTFS mounts. Linux doesn't yet have NTFS write support which means that if you did actually try and write to an NTFS partition it would corrupt it and you'd lose your data. I'm not sure if removing ro will actually allow you to try and write to it (probably the underlying driver has that functionality disabled or not compiled in) but its not worth taking the risk. The users thing will control who can mount and umount the partition but not the permissions on it when it is mounted.

If you look in man mount and look in the NTFS section you'll see all the options explained there, including this:
Quote:

uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is
given in octal. By default, the files are owned by root and not
readable by somebody else. The umask value is given in octal.

dcg757s 11-10-2005 08:17 AM

what values should be put into uid.gid,umask???

# mount -t ntfs -o user,noexec,suid,uid=500,gid=500,umask=227 /dev/sda1 /windows/c -r
# mount -t ntfs -o user,noexec,suid,uid=500,gid=500,umask=227 /dev/hda1 /windows/d -r

here is this now,
/dev/hda3 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/sda1 on /windows/c type ntfs (ro,noexec,nodev,uid=500,gid=500,umask=227)
/dev/hda1 on /windows/d type ntfs (ro,noexec,nodev,uid=500,gid=500,umask=227)

and I still can't get in, says access denied

dcg757s 11-10-2005 08:19 AM

here is my /etc/fstab
/dev/hda3 / reiserfs acl,user_xattr 1 1
/dev/sda1 /windows/c ntfs ro,user 0 0
/dev/hda1 /windows/d ntfs ro,user 0 0
/dev/hda2 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/dvdram /media/dvdram subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0

tkedwards 11-10-2005 05:18 PM

In /etc/fstab:
Code:

/dev/sda1 /windows/c ntfs ro,user,nosuid,nodev,umask=0 0 0
/dev/hda1 /windows/d ntfs ro,user,nosuid,nodev,umask=0 0 0

Then (as root):
Code:

mount -o remount /windows/c
mount -o remount /windows/d


dcg757s 11-11-2005 04:54 PM

thanks for the help b0uncer and tkedwards. Got it up and running, users priv's and getting no access denied.


All times are GMT -5. The time now is 08:58 PM.