LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-09-2005, 11:44 PM   #1
dcg757s
LQ Newbie
 
Registered: Jan 2005
Distribution: Suse 10.0
Posts: 10

Rep: Reputation: 0
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.
 
Old 11-09-2005, 11:56 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
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.

Last edited by b0uncer; 11-09-2005 at 11:57 PM.
 
Old 11-10-2005, 12:10 AM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
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.
 
Old 11-10-2005, 08:17 AM   #4
dcg757s
LQ Newbie
 
Registered: Jan 2005
Distribution: Suse 10.0
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 11-10-2005, 08:19 AM   #5
dcg757s
LQ Newbie
 
Registered: Jan 2005
Distribution: Suse 10.0
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 11-10-2005, 05:18 PM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
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
 
Old 11-11-2005, 04:54 PM   #7
dcg757s
LQ Newbie
 
Registered: Jan 2005
Distribution: Suse 10.0
Posts: 10

Original Poster
Rep: Reputation: 0
thanks for the help b0uncer and tkedwards. Got it up and running, users priv's and getting no access denied.
 
  


Reply



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
How can "root" unlock a locked screen in Gnome? AZ_Rider Linux - Newbie 5 11-30-2011 01:28 AM
Locked Files - How To Unlock Them bas12547 Linux - Software 9 01-26-2011 04:11 PM
DISCUSSION: unlock rpmdatabase when: RPM DATABASE LOCKED bglnelissen LinuxAnswers Discussion 5 03-01-2008 06:46 AM
Locked VFAT Drive, can't Unlock Kenji Miyamoto Linux - General 9 01-04-2005 09:28 PM
CDROM is "locked", can't unlock it thezerosystem Linux - Newbie 6 04-19-2002 08:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration