LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-19-2010, 01:13 PM   #1
eliassal
Member
 
Registered: Jan 2008
Posts: 100

Rep: Reputation: 0
mounted partiton can not be accessed by user


Hi, I have a 500 G, where 80 are used for FC13. I added a new 80 G partiton, using Disk Utiliy, called it Backup, and I can access it when I am logged as root,
When I log with any other user, even with all privileges (added almost in all groups), I get a dialog box requesting authentication.

I enter my user password, file manage just disappears as soon as dialog box disappears and I think it is a permission issue again.

In disk utility opposite to Device there is "dev/sdb", in mount point there is media/backup.

I opened fstab, I can not see an entry, here is the fstab :

Quote:
#
# /etc/fstab
# Created by anaconda on Wed Jun 16 00:58:19 2010
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=ae72b7f7-2a24-4797-9be6-dd079a3e713a / ext4 defaults 1 1
UUID=bd2e2fe1-9c09-4804-916f-8e8cadd20550 /boot ext4 defaults 1 2
UUID=28bbcfcb-b69d-48fc-9356-1d7af846b828 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sda1 /media/sda1 ext4 users 0 0
So what is the route to follow to follow to allow my user to access normally read and write to it without anu persmission issues

Thanks for your help
 
Old 11-19-2010, 03:53 PM   #2
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
Do you want this partition mounted automatically every time you boot? In this case, you will need to put an entry in /etc/fstab.
Do you want to mount it only when you do a backup? In this case you can mount it manually, or use a script.
You say you added a partition, but that "/dev/sdb" sounds as though you have added a disc drive.
The command fdisk -l will show you what you have in the way of partitions. (You have to be root, so either su to root, or precede the command with sudo)
blkid, again as root, will give you the uuid's of your partitions.
If you want to mount it every time add a line like this to /etc/fstab:
Code:
UUID=xxxxxx /backup ext4 defaults 0 2
NOTE 0 Replace xxxxxx with the id you get from blkid
NOTE 1You'll need to do
Code:
sudo mkdir /backup
for this to work. You could also use /mnt/backup, or pretty much anywhere, but if it's mounted every time you might as well have it directly under / for convenience.
NOTE 2 You could also use /dev/sdxx in place of the UUID. Get the xx from the output of fdisk -l
Note 3 If you're not using ext4 change this in the fstab entry.

If you just want to mount it when you feel a backup coming on:
Code:
sudo mount -t ext4 /dev/sdxx /mnt/backup
Make sure you have a folder /mnt/backup, of course.
Ownership/Permissions:
Backing up and restoring is something that is normally done by root. You are best off leaving ownership as root:root (owner root, group root). Permissions would normally be 755 (drwx r-xr-x)
 
Old 11-19-2010, 03:53 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,551

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
You created a new 80GB partition on your 500GB drive??
What is the partition? sda?
Do you have a mount point /media/Backup created?
The /dev/sdb would be referring to another physical drive. Do you have one?
You would need the actual mount point and the partition and put an entry in fstab similar to the last line.
 
Old 11-19-2010, 04:37 PM   #4
eliassal
Member
 
Registered: Jan 2008
Posts: 100

Original Poster
Rep: Reputation: 0
Thanks

Thanks for both of you.
In fact I am not so expert in linux admin, I am more a developer.
What I am trying to do is have a a partition where I put my data.
Whne I have installed fedora, I made fedoras decide the layout but indicated to have 80 G for filesystem, 4G for swap.

Then later, I decide to have a different partiton for my data available (mounted automatically every time I boot) for all users not only for root.

So what I did is used Disk utility > Format drive > gave the size then mount.
I found my self having Device = "dev/sdb", in mount point =media/backup. This is all done by fedora.

So to respond to your queries :

Yes I want this partition mounted automatically every time you boot?
Yes, I want other users acces it normally, create, write, execute....
No, I dont want in the "/" nor mount, I would like to have it as independant disk

I issued the
Code:
fdisk -l
, the partition in question highlighted in bold

Quote:
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 64 10263 81920000 83 Linux
/dev/sdb3 10263 10773 4096000 82 Linux swap / Solaris
/dev/sdb4 10774 30852 161284567+ 83 Linux

Disk /dev/sdg: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6c62398e

Device Boot Start End Blocks Id System
/dev/sdg1 * 1 30401 244196001 7 HPFS/NTFS
Now impert, why do I need to issue the command
mkdir /backup

It is mounted and I can see it. ROOT user can create files and directories, so why to allow my user to do the same thing I need to do all this, just for my understaning if you allow me.
 
Old 11-19-2010, 04:44 PM   #5
eliassal
Member
 
Registered: Jan 2008
Posts: 100

Original Poster
Rep: Reputation: 0
Partiton disappeared after adding it in fstab

I added the following to fstab

Code:
UUID=85788161-608d-4ff3-a4b5-5de9f7aa9aa8  /backup	ext4	defaults	0  2
rebooted, logged with my user I dont see the partition anymore.
 
Old 11-19-2010, 04:45 PM   #6
eliassal
Member
 
Registered: Jan 2008
Posts: 100

Original Poster
Rep: Reputation: 0
test

dfdf
 
Old 11-19-2010, 05:11 PM   #7
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
OK, reading between the lines you are at present letting Nautilus (or whatever other file browser you use) automatically mount it as if it were a USB device or a CD. Which is why you are getting the default behaviour that you are seeing.
If you want to mount it every time in a somewhat more formal way, then put it in /etc/fstab as I suggested above. To do this you need to make a folder somewhere, and that folder has to have a name. I suggested /backup so it will be at the top of the tree and easily accessible. It has to be in /, because everything is - everything that your system can see, that is. When it is mounted automatically at present, it is in /media, which is in /.
I've already said that you would be better to leave it owned by root, and only writeable by root, but if you still want to give read, write, and execute permissions to everybody, then the command is:
Code:
su
chown -R 777 /backup
It's a good idea to look at the man pages for each command before you use it
man chown, man mkdir, etc. First look up man itself: man man so you get to understand the syntax.
Quote:
I added the following to fstab

Code:

UUID=85788161-608d-4ff3-a4b5-5de9f7aa9aa8 /backup ext4 defaults 0 2

rebooted, logged with my user I dont see the partition anymore.
If you type
Code:
ls -l /
you should see it, with its permissions. You can also navigate to it with the file browser: just click on Places>File System.
 
  


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
Is there any way to tell which user last accessed a file? sixerjman Programming 2 10-19-2006 01:28 AM
mounted volume can only be accessed by root EcceVery Debian 7 08-01-2004 08:45 AM
mounted hard drive can only be accessed by root Flutterby Linux - Hardware 3 07-17-2004 03:52 AM
how to write to a mounted windows partiton on fedora? muhrwa Linux - Hardware 4 04-30-2004 06:54 AM
Slack 9: mounted FAT32 partitions cannot be accessed by normal user Obi-Wan_Kenobi Slackware 6 07-12-2003 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:34 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