Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to delete some torrents that I had downloaded with transmission-daemon and was unable to from my samba share on windows due to transmission's default file creation permissions.

I figured the best solution was to sudo chmod -R 0777 /media/Storage (my drive with samba) but apparently not.

This locked both my windows user and my user on my ubuntu server out of the drive completely, with a message saying ls: cannot access /media/Storage: Permission denied.

I am able to login as root with sudo bash and make changes however I am uncertain as to how to make my drive accessible again.

Doing a ls -ld on the directory shows drwsrwsrwx 39 root root 4096 Nov 17 21:20 /media/Storage.

I have also done a: sudo chown -R [username]:[group] /media/Storage and a sudo chmod -R u+rw /media/Storage. Both commands executed without errors but had no good effect.

I am running ubuntu-server 12.10 so no GUI available. Any ideas?

share|improve this question

You have the SetUID and SetGID bits set, which are causing things to be owned root.root, and otherwise making you have a Bad Day.

sudo chmod -R u-s,g-s /media/Storage should fix you up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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