John Scott
I'm trying to set permissions for /tmp. The dir permissions are 1777. When I mount it with mount -t ext3 /dev/hda5 /tmp the permissions change to 0755.
Permissions of the root directory of the mounted file system take precedence over the permissions of the mount point. The fix should be obvious now.
... Nothing like a vague, ambiguous answer so early in the morning.
The answer wasn't that much ambiguous as you think. Run # mount -t ext3 /dev/hda5 /tmp # 0755 # chmod a+rwxt /tmp # 1777 The permissions will be 1777 the next time you mount /dev/hda5.
The problem is, you can't change permissions of a mounted mount point.
That's true. Actually, this is what the sentence about permission precedence says: the permissions of the mounted mount point are hidden.
The command will error with "busy".
How did you do that?
The original question was how to get it to mount with the permissions I specified.
Do you want to fix a directory permissions or implement a mount option which overrides the Linux defaults? In the former case use the recipe above, in the latter case ask people in the linux-kernel list.
It is absolutely NO help to tell me how obvious the answer should be rather than simply telling me the answer.
I don't agree. If the answer doesn't help you then you can ask again. A solution may be obvious but it doesn't mean it's short. It's all about time: a hint may be enough for an advanced administrator but a beginner may need a 2 pages recipe. -- Alexandr.Malusek@imv.liu.se