How can I give the permission of load a partition to a normal user?

On Opensuse 11.3,a normal user could not access and modify files in other partitions as the default setting .Is there any way to give a permission to a normal user to do these things instead of do these as a root user?

Please post result of
cat /etc/fstab

and of this: (fdisk -l)
https://www.youtube.com/watch?v=h191KrDK-I0)

Tell us which partition/s you need to access and what file system they are (ext4/3, ntfs…)

caf4926 wrote:
> ‘YouTube - su - fdisk.mpeg’
> (http://www.youtube.com/watch?v=h191KrDK-I0)

nice video!
i really liked that authoritative stroke to make the dash!

of course, i guess you know by carefully analyzing the sounds
generated during the password entry that some governments now have
easy entry to your box…so, put on your tin foil cap!


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
When it comes to chocolate, resistance is futile.

You have to setup your /etc/fstab proberly there are the options user and users for specifying that everyone is allowed to mount a device

use the option user in /etc/fstab if you which only the user who has mounted the filesystem can unmount it
use the option users in /etc/fstab if you which all users can unmount the filesystem

I’m really to SUSE.Here’s the file in fstab

/dev/disk/by-id/ata-TOSHIBA_MK2555GSX_Y9SKF8XKS-part10 swap swap defaults 0 0
/dev/disk/by-id/ata-TOSHIBA_MK2555GSX_Y9SKF8XKS-part11 / ext4 defaults 1 1
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

and the fdisk -l is here:

Disk /dev/sda: 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: 0x80d2f3ee

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3915 31447206 7 HPFS/NTFS
/dev/sda2 3916 30401 212748795 f W95 Ext’d (LBA)
/dev/sda5 3916 12839 71681998+ b W95 FAT32
/dev/sda6 12840 21763 71681998+ b W95 FAT32
/dev/sda7 21764 23357 12800000 83 Linux
/dev/sda8 23358 23459 819283+ 82 Linux swap / Solaris
/dev/sda9 23460 26067 20948728+ 83 Linux
/dev/sda10 26068 26329 2104483+ 82 Linux swap / Solaris
/dev/sda11 26330 30401 32708308+ b W95 FAT32

Opensuse is on sda11.There’re a WIn7 and an Ubuntu here.
What should I do to get the permission?Thanks.

Open a terminal and become su -

Do this:
( I make an assumption here, that your username in SUSE is dorian - Change as required )

mkdir /windows
mkdir /ubuntu
chown dorian /windows
chown dorian /ubuntu

Now in a normal user terminal do

kdesu kwrite /etc/fstab

Edit your fstab to look like this

/dev/disk/by-id/ata-TOSHIBA_MK2555GSX_Y9SKF8XKS-part10 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_MK2555GSX_Y9SKF8XKS-part11 /                    ext4       defaults              1 1
/dev/sda1 /windows ntfs-3g defaults 0 0
/dev/sda7 /ubuntu ext4 acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0                      

Please check sda7 is Ubuntu and edit accordingly
I had to guess

reboot

That works well.Thanks a lot!:wink:

Happy to help

Hi,

I have a similar requirement in my OpenSUSE 11.3 instance. Following is the fstab and fdisk configurations.
I need the misc, personal and work partitions to be loaded with my user name (sathish) and full permissions.

I run only OpenSUSE in my machine and no idea of dual boot with windows.
Could anyone help in this ? It would be better if you could give some explanations of the changes also.

linux-pdsh:/ # cat /etc/fstab
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part10 swap swap defaults 0 0
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part1 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part5 /home ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part11 /misc vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part7 /opt ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part9 /personal vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part6 /usr ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-ST3500418AS_6VM8E0KB-part8 /work vfat user,users,gid=users,umask=0002,utf8=true 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

linux-pdsh:/ # fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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: 0x000e270b

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1216 9767488+ 83 Linux
/dev/sda2 1217 60801 478616512+ 5 Extended
/dev/sda5 1217 6438 41945683+ 83 Linux
/dev/sda6 6439 11660 41945683+ 83 Linux
/dev/sda7 11661 16882 41945683+ 83 Linux
/dev/sda8 16883 29936 104856223+ c W95 FAT32 (LBA)
/dev/sda9 29937 42990 104856223+ c W95 FAT32 (LBA)

Regards
Sathish

On 2011-01-07 04:06, vanensat wrote:

> I need the misc, personal and work partitions to be loaded with my user
> name (sathish) and full permissions.

uid=sathish,gid=crypta,fmask=0117,dmask=0007

> Could anyone help in this ? It would be better if you could give some
> explanations of the changes also.

man mount >:-)

Sorry, 4.45 AM here, and it is a long explanation.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

If you don’t use windows
Why are you using vfat? It’s rubbish.

I need the misc, personal and work partitions to be loaded with my user name (sathish)
They are already mounted
Do you mean you want them in a different directory? Eg: /home/sathish/misc

If you don’t use windows
Why are you using vfat? It’s rubbish.

Could be now. I earlier had a Windows installation and now moving to development in Linux.

They are already mounted
Do you mean you want them in a different directory? Eg: /home/sathish/misc

Ok. I was not clear in the earlier post. I faced following issues in the mounted drives.
(All operations done as superuser.)

  1. Could not change the ownership for the drive/any folder in the drive to normal user. chown failed.
  2. Shell script execution was not possible for any user including root. Permission denied error. After reading the mount manual, I understand ‘exec’ should be added to fstab.
  3. The /misc partition was not created properly and was not mounted.

Anyways, as the drives had online SVN content (no requirement for back-up), I converted them to ext4 and changed ownership to normal user. All issues solved.

Apologies. I should have referred to the manual before posting. Thanks all for your time to reply.

On 2011-01-09 02:36, vanensat wrote:

> 1. Could not change the ownership for the drive/any folder in the drive
> to normal user. chown failed.

It is not possible to change ownership or permissions of FAT partitions for
single files or directories. Only of the entire partition, all files
simultaneously. via mount options. They are in fact faked permissions, not
real.

> 2. Shell script execution was not possible for any user including root.
> Permission denied error. After reading the mount manual, I understand
> ‘exec’ should be added to fstab.

Don’t run any file at all in fat partitions, forget it.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)