0

I've spent 4 hrs going through all the relative forum q&a's and I still cant fix my problem. I am very much a newbie I've created a partition /dev/sda2/ at /mnt/sda2/. Its an ext4 partition and I've given it the label 'Disk2' . I cant access or share it because its owned by root. Can someone who is patient pls help?

1
  • How do you mount the partition? – A.B. May 26 '15 at 19:20
0

As you have it mounted:

echo $USER
cd /mnt/sda2
sudo chown USR:USR .

... where you must replace the two USR-instances with what echo $USER prints. (Untested!)

4
  • Sorry for the harsh words, but that's all quite nonsense. – A.B. May 26 '15 at 19:16
  • Then please take a constructive leap and add something fpr me and others to learn from. I'll remove the nonsense as you have done so. – Hannu May 26 '15 at 19:22
  • While same thing as above you can use $USER. sudo chown -R $USER:$USER /mnt/sda2 Often better not to use device name as mount, just to avoid confusion. I might then mount as /mnt/Disk2 if that is the name you like. But make sure you have not already mounted with Naultilus as it can only be mounted once. I also like to give myself permissions to use it. sudo chmod -R a+rwX,o-w /mnt/sda2 but note that -R is recursion and all lower level folders are also changed. Never run on a system partition as you will just then have to reinstall and restore from backups. – oldfred May 26 '15 at 19:43
  • @oldfred as this was a just partitioned, formatted and mounted disk, chmod 755 -R . (or whatever) should not be necessary in my opinion, but I might be wrong. I was in doubt about when $USER:$USER gets evaluated, therefore avoided it. – Hannu May 26 '15 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.