What OS is the server? Does it support CIFS Unix extensions? If not then nothing you do with chmod matters. You can set the user owner, file and directory permissions by setting options within your mount.
http://linux.die.net/man/8/mount.cifs
uid=arg
sets the uid that will own all
files on the mounted filesystem. It
may be specified as either a username
or a numeric uid. This parameter is
ignored when the target server
supports the CIFS Unix extensions.
gid=arg
sets the gid that will own all
files on the mounted filesystem. It
may be specified as either a groupname
or a numeric gid. This parameter is
ignored when the target server
supports the CIFS Unix extensions.
file_mode=arg
If the server does not
support the CIFS Unix extensions this
overrides the default file mode.
dir_mode=arg
If the server does not
support the CIFS Unix extensions this
overrides the default mode for
directories.
You can copy the lines started with /dev/sd**
from mtab (/etc/mtab
) and paste them in to a new text file and change /dev/sd**
with UUID
or LABEL
.
For example from your config:
use
UUID="3fc55e0f-a9b3-4229-9e76-ca95b4825a40" / ext4 rw,errors=remount-ro 0 0
instead
/dev/sda1 / ext4 rw,errors=remount-ro 0 0
The line above also works, but UUID
is the new standart and if your grub configured with UUID
, it might can't understand which partition is what.
if partition has Label you can use the LABEL
instead UUID
, for example:
LABEL="Files_Server_Int" /media/Files_Server ext4 rw 0 0
IMO copy your mtab to a new file and remove the lines started with "none"
and change the /dev/sd**
part with blkid output equivelants. If UUID exist, use the UUID
instead of /dev/sd**
. If LABEL exist use the LABEL
instead of UUID.
Do not remove anything else except "none"
lines. Save the file, change the file name to fstab
and copy in to /etc
.
Finally add lines for swap
if any (if you forget this, your system will boot but you might have zero swap space or swap file will be generated at root (/
) depending of OS default configuration.). e.g. in your case note that blkid
prints this line:
/dev/sda5: UUID="718e611d-b8a3-4f02-a0cc-b3025d8db54d" TYPE="swap"
so you need this line in fstab
:
UUID=718e611d-b8a3-4f02-a0cc-b3025d8db54d none swap sw 0 0
This might help to restore your fstab.
Best Answer
Are you using a VPS? If so, you probably don't have access to the real filesystem of the host system. What are you trying to do?