Код: Выделить всё
/dev/sda1 swap swap defaults 0 0
/dev/sda2 / ext4 defaults 1 1
/dev/sdb1 /media/tank1 reiserfs defaults 1 0
/dev/sdc1 /media/my reiserfs defaults 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
Код: Выделить всё
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
# http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = server
# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
security = share
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 192.168.1. 127.
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
load printers = yes
# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
printing = cups
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
guest account = guest
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
local master = yes
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
os level = 65
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = HP_LaserJet_1020
path = /var/spool/samba
browseable = no
public = yes
# Set public = yes to allow user 'guest account' to print
guest ok = yes
writable = no
printable = yes
[my]
path = /media/my
comment = my
create mode = 0777
writeable = yes
browseable = no
[tank1]
path = /media/tank1
comment = tank1
create mode = 0777
writeable = yes
browseable = no
[hd0]
path = /media/hd0
comment = hd0
writeable = yes
browseable = no
[films]
path = /media/my/films/
comment = films
guest ok = yes
writeable = no
browseable = yes
[install]
path = /media/my/Install
comment = install
guest ok = yes
writeable = no
browseable = yes
[photos]
path = /media/my/Fotos/
comment = photos
guest ok = yes
writeable = yes
browseable = yes
Монтирую диск путем:
Код: Выделить всё
mount.cifs //server/tank1 //mnt/tank1 -o user=archangel
при этом когда я пытаюсь скопировать что-то на подмонтированный диск - выкидывается warning, что невозможно изменить владельца и папки при этом копируются пустыми. Приходится вручную все файлы копировать, рекурсивно не делает, это если через mc. Из консоли cp - говорит невозможно создать каталоги и файлы и копирует пустой каталог.
Что я делаю не так? И как правильно развести все права. Нужно сделать, чтобы пользователь archangel имел полный доступ на сетевой диск, остальные могли подключать в режиме ro.
PS Еще несмотря на опцию в fstab create mode = 0777, папки создаются с правам: rwxr-xr-x.