Adding A New HardDrive

Hello
This is my first post, i am new to linux

I installed suse12.3 to a 120gb drive it has 2.5gb swap, 30gb system(root), and the remainder of drive is a separate partition for /home
the machine had a 1tb ntfs drive with some data on it when i installed suse

I have been given a 750gb drive, I installed this into machine used yast to partition it with a format ex4 and added mounting point /hard-drives/750gb
the problem i am having is i cant write to the drive when i am logged in with my user account but i can write to it when i am in root or if i use super-user dolphin

how do i change the permissions so i can read/write to the drive when i am logged in with my user account

i also have some but not major problems with the ntfs drive i have to use the root password when i open dolphin and click on the drive but i can read/write to it
after inputting the root password can this been changed so i can use drive without entering the root password?

thanks
stan

Edit the line in fstab to

defaults 0 0

see this:
https://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/413463-fstab-editing-manually.html

You may need to chown -R
or not
do the fstab edit first, be careful

hi caf4926

is your reply for the ntfs drive?..

i am very new to linux as in 2wks first time i have tried any other operating system other than windows

On 2013-03-29 20:46, stantheman1066 wrote:
> the problem i am having is i cant write to the drive when i am logged
> in with my user account but i can write to it when i am in root or if i
> use super-user dolphin

You need to read about permissions in unix/linux :slight_smile:

Ok, so this is an ext4 filesystem. You can, once it is mounted, change
the permissions or ownership or both of “/hard-drives/750gb”, or create
a directory and chown it to your normal user.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

right i think i understand now…

I will go have a good read and a nights sleep and maybe a bit more of a read
then try it out…

thank you

but if i am still having problems been a bit thick i will come back to this posting

again thx

Yes the NTFS

Tell you what, let us see from your terminal:

cat /etc/fstab

We don’t know if you have given then volume labels or specific mount points
Personally, I give a partition a Label (for Eg) STORE
And when installing I set the mount point /STORE
I don’t use any NTFS now so to make it RW I do as su -

chown -R xxxx STORE

I only had to do that when I first set it up. Subsequent installs all work without chown, so long as I keep the same user xxxx

In Dolphin super user, you can right click the root folder (eg: for me STORE) > properties > permissions
And you can tweak them from there too

Hi caf4926

Thanks all working now, and i have a better understanding of the process
you cant get better than that…

Good news.Well done!

There is an easy solution to this problem that I found on another site and works great. I will recreate the commands here but the props go to dario on superuser site.

/etc/fstab should contain the following, of course you can use UUID

/dev/<partition> <mount_point>          ext4       rw,acl       0 0

Once you change /etc/fstab you will need to reboot or unmount and then re-mount the drive for changes to take effect.

Then run these commands which will first give the mount point to the group users (change it to whatever group you want) and the second command will give the default group (users) the right to read/write and execute on the mount point. This implies that you have the acl package installed.

chgrp -R users <mount_point>
setfacl -d -m g::rwx <mount_point>

So this still leaves the mount point owned by root but gives all permissions to whatever group you want (in this case) users.

There have been a couple of times that this did not work on the first try ( over ssh). If you get some weird permissions you can reset the whole thing and start over with the following.

setfacl -R -b <mount_point>