When auto-mounted the drive is not read- or writable so I remount using:
mount -o remount,uid=1000,gid=1000,rw /dev/..
mount says:
rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2
Afaik uid 0
is root?
As an example as to what I do:
sudo su
rm -f filename
Now the file disappears from the folder as I intended, as soon as I reload the folder, remount or w/e the file reappears, same goes for replacing files, creating folders etc.
Edit: all files and folders are rwxrwxrwx
/ Ubuntu 19.10
Maybe someone can enlighten me, as I am somewhat of a noob and my understanding goes as far as file ownership and rwx
permissions..
You could set your partition in
/etc/fstab
as follows:You could get a UUID from
sudo blkid
command output.But to access it you should have required permissions to change its folders and files ownership.
For example, if you want your
user
to access (read/write) sometest
folder on it, make sure it has appropriate ownership:For example, one folder in my user's directory looks like this:
If you have something like:
Then change its ownership the next way:
Your user should have permissions to read/write inside of that folder.
drwx
: directory, read, write, executed rwx rwx rwx
: directory, user, group, othersdrwxrwxr-x
means everyone could read and execute files, but only user and users from group could write. Others do not have write permission.And yes,
uid 0
is root. You could find out it bycat /etc/passwd | grep root