0

Not knowing well what I was doing, I opened a tar with sudo, and now it's linked to a user that doesn't exist and I can't remove it under any circumstances - perhaps because it's off the home directory. Help please?

total 44
drwx------ 2 3047 3047  4096 Sep 25  2012 library
drwx------ 2 3047 3047  4096 Sep 25  2012 source
drwx------ 2 3047 3047  4096 Sep 25  2012 examples
-rw-rw-rw- 1 q    q    28828 May  6 07:02 image_processing.tar.gz
4
  • 1
    What do you mean by 'linked to a user'? May 6, 2013 at 14:25
  • some random numeric user name has permissions to open or otherwise affect the directories and files : S
    – user156119
    May 6, 2013 at 14:26
  • Can you please execute ls -ltr and include the output in your question? May 6, 2013 at 14:28
  • output is now included
    – user156119
    May 6, 2013 at 14:32

1 Answer 1

1

do sudo chown $USER <path to file> in terminal to change yourself to its owner.

then do sudo chmod 755 <path to file> to change it to usual permissions.

3
  • So far, so good! Will do one more update - but I think you've just restored my day : )
    – user156119
    May 6, 2013 at 14:46
  • 1
    $USER will automagically change it to your current user ;)
    – Rinzwind
    May 6, 2013 at 14:49
  • Yep - day == saved! Thanks again! I'll come up with somewhere better to store my files, and I'll make a note of the commands used, just in case : )
    – user156119
    May 6, 2013 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .