LinuxQuestions.org
Help answer threads with 0 replies.
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 05-24-2007, 01:53 AM   #1
CyrusArdain
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
why is my permission denied to /etc/fstab


ok im very very new to linux, just set up a dual boot system with xp64 and ubuntu 7.04 x64

Ok, my initial problem was to figure out how to mount my FAT32 drive,

but from everything ive read online i need to look at my /etc/fstab file...but i cannot access it because permission is denied...found nothing online that really addresses this.

how do i view the /etc/fstab ? ( i have done nothing in ubuntu thus far except update files.)

anyhelp would really be appreciated

Cyrus
 
Old 05-24-2007, 02:43 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
One magic word: sudo.

Sudo gives you adminstrator permissions. In order to issue a command with such permissions, you would type this into the terminal:

sudo [command]

For example, if you need to edit /etc/fstab:

sudo nano /etc/fstab

and it will ask for your password, after which it will open the file so that it can be edited.
 
Old 05-24-2007, 02:58 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Is this an external drive or a partition on an internal hard disk?

If it is an external drive, I would recommend using UUID= in your fstab entry instead of the device, because the device might change in the future.

Try using udevinfo to gather the info you need.
First determine the device that is used presently. You can do that by monitoring /var/log/messages as you plug in the usb cable:
Code:
sudo tail -f /var/log/messages
Suppose that the partition on the drive is /dev/sda1. Then you can use udevinfo to determine what the UUID number is of the filesystem:
Code:
udevinfo -q env -n /dev/sda1
Note the line for "FS_UUID=". Copy the UUID number, then edit your /etc/fstab entry for the device:
Code:
UUID=<UUID #> /media/usbdisk vfat defaults,uid=yourusername,gid=yourgroup,noauto,fmask=0117,dmask=0007
Read the man mount page for more options. I used /media/usbdisk as the mount point, but the one you use is up to you. The "noauto" option will prevent the partition from being mounted on boot. Use this for removable disks.

If the partition is on an internal drive, then you can use the device instead, such as /dev/hda3 if that is what it is. In this case, don't use the "noauto" option.
 
Old 05-24-2007, 03:05 AM   #4
CyrusArdain
LQ Newbie
 
Registered: May 2007
Posts: 2

Original Poster
Rep: Reputation: 0
i just cant do anything....

i have no permission to access anything

Ive tried using su, then typing in the password, and it says that im root@<user-id>.....

but even still when i try to look at my /etc/fstab file it tells me permission denied.

btw, this is a partition on internal drive.

I pretty much know what i have to do to mount my FAT32 but i just cant gain permission

please help
 
Old 05-24-2007, 03:09 AM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Don't use su, ubuntu doesn't allow it unless you set it up yourself first. Use sudo.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 05:50 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 06:57 AM
Permission DENIED in /dev/hdb1 (NTFS) | fstab? BlueSpirit Slackware 2 09-03-2006 11:47 AM
FSTAB / Permission Denied Error clearh20 Linux - Newbie 5 06-10-2003 01:43 AM
Permission Denied lackof Linux - Networking 1 08-14-2002 11:46 PM


All times are GMT -5. The time now is 04:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration