Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have a few Ubuntu instances on EC2 where I use the /mnt instance storage to keep logs and other fungible stuff. In order to store user logs the /mnt directory needs to have 777 permissions:

$ sudo chmod 777 /mnt

But periodically (about daily) permissions revert back to 755, for no apparent reason. Is there any way to make /mnt have write permissions for all users -- and keep it that way? I already have a task that runs on startup with the above line, but apparently it does not work.

A periodic task would be a last resort; honestly, I would like to understand the problem and solve it correctly. I have searched here and on the intertubes, no luck so far -- it is not an easily googleable question anyway.

Perhaps some mount options would do the trick? My fstab:

/dev/xvdb       /mnt    auto    defaults,nobootwait,comment=cloudconfig 0       2
share|improve this question
What filesystem is on the volume being mounted? You should almost never have permissions set to 0777. That strongly indicates you are doing something wrong. – Zoredache Sep 13 '13 at 22:55
Can you just create a sub-directory to /mnt that will have the permissions you need? – ernie Sep 13 '13 at 23:01
@Zoredache Possibly, in that case I would like to know how to do things right. – alexfernandez Sep 14 '13 at 7:41
@ernie I suppose so, but I would need to recreate that directory on boot using a task. I am already setting permissions to 777 in a task and it is not working. I would like to know what is wrong so that I can be sure that any new scheme works without mucking around. – alexfernandez Sep 14 '13 at 7:44
I'm not sure what's resetting the mount points permissions (I'd guess something with how ephemeral storage works on EC2), but I'd guess that it won't change permissions on subdirectories . . . – ernie Sep 15 '13 at 17:06
up vote 1 down vote accepted

While I'm not sure what's causing the permissions to reset (I would guess it's a policy around the ephemeral storage on an EC2 instance), but I think a more secure way to handle this would be to create a directory on /mnt with the permissions you need.

My theory is that this directory would not have it's permissions changed by whatever maintenance Amazon is running, plus it's more secure.

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.