howto mount /tmp partition with the noexec,nosuid

Barakat

Verified User
Joined
Aug 11, 2007
Messages
36
i need help on howto

mount the /home partition with the nosuid option
and the /tmp partion with noexec,nosuid

[root@server /]# df -h
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      217G   14G  193G   7% /
/dev/sda1              99M   18M   76M  20% /boot
tmpfs                 2.0G     0  2.0G   0% /dev/shm
 
etc/fstab is just only read system

How to make it read/wrote


It didnot work for me !!!
Mount -o -n remount
 
You must be root to edit fstab. Be careful; it's easy to break it and then your system won't boot anymore.

Jeff
 
You must be root to edit fstab. Be careful; it's easy to break it and then your system won't boot anymore.

Jeff

yes ,, iam root over there , but i cant edit it ,,

its read only system file !

i need to change it manualy so as to save the and boot it again ,,
coz its not working .
 
Wouldn't it be extra safe to chmod all the popular /usr/bin/ files to 700:

i.e
chmod 700 /usr/bin/wget
chmod 700 /usr/bin/lynx
...
etc
That way, only the group owner (root) can run them
 
Yes it will if they cannot execute the programs they are trying to then its not going to work. You better know what binaries to chmod though that wont break the system.
 
Accualy i cant reach my server coz i have to go over 70km from my home

and the guys over there could not even add or edit that fstab even i gave them the root pw ,

they told me that all the system is read only and i dont want to reformat it again if i could have a simple code wich safe me from that ,

today i will have the ip kvm so as to try to resolve it ,,,

thanks for all of you and if you have any idea about my problem just inform me ,
 
Last edited:
Code:
/dev/tmpMnt  /tmp                    ext2  loop,nosuid,noexec,nodev,noatime,rw  0 0

this is the line which i delete if before rebooting and i could not edit the fstab after it

how to make unamount to it ,,,
 
I would say backup everything before rebooting but I don't know how to do that if your system is read only. At least download all your data.

You file system or hard drive is going bad. Your only choice is to reboot and hopefully it will come back up. fsck may have to be run manually upon reboot. Have the DC people standing by to do it.

Replace the hard drive as soon as possible.
 
fixed and running now ,,,

its was an amount to a disk with its was not exists in the fstab

i chmod all the tmp chmod

and remount the /tmp partition ,,

thank for you all
 
Generally if the entire filesystem is read only it means there's a hardware problem. I don't know why it happened for you; an illegal mount in fstab shouldn't do that.

To Floyd and others: You can backup a read-only file system to an externally mounted drive (even one formatted with an MS-based filesystem) by tarring directly to the external drive.

Jeff
 

I guess I should have said I don't know how to tell Barakat how to do it since I do not know anything about his system but I did not feel like explaining every possible way I know to do it.
 
Nothing personal, Floyd; I just wanted to point out for Google that DirectAdmin admins could make backups that way. Probably more than a few don't realize it.

Jeff
 
Back
Top