LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-10-2006, 07:49 PM   #1
AndrewZorn
Member
 
Registered: Apr 2005
Posts: 108

Rep: Reputation: 15
I cannot access the partitions I mounted unless I am root


I am using gentoo

Here is my fstab:
Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't 
# needed; notail increases performance of ReiserFS (at the expense of storage 
# efficiency).  It's safe to drop the noatime options if you want and to 
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>			<mountpoint>	<type>		<opts>		<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT		/boot		ext2		noauto,noatime	1 2
/dev/sda2		/		ext3		noatime		0 1
/dev/sda3		none		swap		sw		0 0

/dev/sda1		/mnt/windows	ntfs		defaults,noatime,ro,user	0 0
/dev/sdb1		/mnt/external	ntfs		defaults,noatime,ro,user	0 0

/dev/cdroms/cdrom0	/mnt/cdrom	auto		noauto,user	0 0
#/dev/fd0		/mnt/floppy	auto		noauto		0 0

# NOTE: The next line is critical for boot!
proc			/proc		proc		defaults	0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0
I can only get to 'windows' and 'external' as root. My user permissions are messed up, i tried to add stuff but now i barely have any permissions and now i supposedly have more than root

googling for linux user permissions is getting me nowhere ive looked on this for over an hour now and im sure its very easy

please help
 
Old 03-10-2006, 07:56 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Try the following and see if it does what you need:
Code:
/dev/sda1  /mnt/windows   ntfs  defaults,noatime,ro,user,umask=0000  0  0
/dev/sdb1  /mnt/external  ntfs  defaults,noatime,ro,user,umask=0000  0  0
 
Old 03-10-2006, 08:04 PM   #3
AndrewZorn
Member
 
Registered: Apr 2005
Posts: 108

Original Poster
Rep: Reputation: 15
ok ill reboot and try that

any idea how i can get a FULL list of the permissions, and how to properly change them for an existing user? usermod is confusing because im not sure if im ADDING or REPLACING permissions with -G
 
Old 03-10-2006, 08:12 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You don't need to re-boot for that to take effefct. Just modify /etc/fstab and remount the filesystem with:
Code:
mount -o remount /dev/sda1
mount -o remount /dev/sdb1
If you want to change the file system permissions for the NTFS partitions, you'll need to do that in /etc/fstab also - NTFS doesn't support Linux file system attributes. You can use the following (if your username is andrew):
Code:
/dev/sda1  /mnt/windows   ntfs  defaults,noatime,ro,user,umask=0000,uid=andrew  0  0
/dev/sdb1  /mnt/external  ntfs  defaults,noatime,ro,user,umask=0000,uid=andrew  0  0
Was that what you meant?
 
Old 03-10-2006, 08:15 PM   #5
AndrewZorn
Member
 
Registered: Apr 2005
Posts: 108

Original Poster
Rep: Reputation: 15
ok that allowed me to get to them

do you know where i can get an entire list of groups/permissions, and instructions on how to set them for users?
 
Old 03-10-2006, 09:19 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Have a look at man chmod, man chown and the info at http://rute.2038bug.com/node17.html.gz - they provide a good explanation of what is happening. The list of users on your system is in /etc/passwd and the list of groups is in /etc/group.

Very briefly, there are three groups of permissions plus 'special permissions' so you'll see four numbers when people change permissions using octal notation. The octal numbers correspond to read, write and execute permissions. Read is 4, write is 2 and execute is 1. So to have a file that can be read, written and executed by anyone you could use either chmod 0777 filename or chmod ugo+rwx filename (ugo is each of user, group, other users)

The leading 0 in the 0777 and the ugo need further explanation, but it will be better described in the link above. For example you could use 'a' for all instead of ugo, etc.
 
Old 03-10-2006, 11:03 PM   #7
AndrewZorn
Member
 
Registered: Apr 2005
Posts: 108

Original Poster
Rep: Reputation: 15
ok i gave myself basically all the permissions of root, using gpasswd -a andrew ______, _____ being the permission and i went down the list one by one

yet i still cannot read CDrom unless im root

now id like to follow your instructions by am i going to have to do this every time or something? i just want to make it to where andrew has all the privileges of root, and then ill subtract out bin, root, and emerge or something later. its just a royal pain that i have to log out and go to my root accoutn which isnt hardly set up or customized or anything just to read a CDrom
 
Old 03-10-2006, 11:19 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You shouldn't have to be root to access your cdrom. You can modify /etc/fstab the same way as for the NTFS partition:
Code:
/dev/cdroms/cdrom0  /mnt/cdrom  auto  noauto,users,exec,ro,umask=0000,uid=andrew  0  0
The command to mount the cdrom when logged in as andrew is mount /mnt/cdrom
 
Old 04-09-2006, 01:24 AM   #9
rmobarak
LQ Newbie
 
Registered: Apr 2006
Location: Albuquerque, NM
Distribution: Ubuntu Breezy Badger 5.10
Posts: 1

Rep: Reputation: 0
Cool Can't access partitions with ntfs file format unless I am root

This info fixed the problem with Ubuntu 5.10, instead of remount, umount, then mount
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give non-root users access to mounted partitions? black hole sun Linux - Software 5 10-28-2004 05:52 PM
Users cannot mount or access mounted windows vfat partitions (Distro: Gentoo Linux) kamel Linux - Software 6 05-15-2004 06:08 PM
Only root access for mounted harddisks lord-darkness Linux - Hardware 6 04-12-2004 01:05 PM
can only access mounted partitions as root true_atlantis Linux - Newbie 2 12-25-2003 08:46 AM
Common user access to mounted partitions? JoooN Slackware 2 02-16-2003 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:49 AM.

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