I have a flash drive which contains recovered files from my old mac, I installed Ubuntu just to recover these files, I have no other purpose for the OS.

The drive shows owner "Root" and the files are owned by #99, so I cannot view or copy the files.

sudo chown -R /media/(rest of path) 

prompts terminal to ask for my password, to which is alternately says either "chown: missing operand after" OR sometimes it says "invalid username"

what am I missing

Also, in one instance I seem to have succeeded, in displayed messages of changing the ownership of every file in the directory, this took several minutes. Then I went to the dir and the ownership had not changed!!!


1 Answer 1

sudo chown -R $USER:USER /media/(rest of path) 


sudo chown -R $USER /media/(rest of path) 

The 1st will change user and group to your current user. The 2nd only set your user to your current user.

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.