Creating Files in Mounted Drive Requires sudo? Permissions problems
Go to solution
Solved by Nayr438,
The correct command is chown user:group file and group isn't needed unless its for a multi user setup.
sudo chown -R $USER /media/2TB/
Will give you ownership over the entire directory.
sudo chown $USER aptpackages.txt
will only give you ownership of aptpackages.txt
If neither of those work, then the drive is mounted in read only and you will need to remount it.
fdisk -l to find the drive
mkdir /path/where/you/want/to/mount
sudo mount -o remount,rw /dev/pathtodrive /yournewdirectory
chown -R $USER /yournewdirectory
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now