Re: [Samba] Samba + acl,user_xattr

2011-12-19 Thread Dmitry Mordovin



At first, has your file system already enabled xattr?
For example, are following commands successfull?

  # touch test.txt
  # setfattr -n user.test -v test test.txt
  # setfattr -n security.test -v test2 test.txt
  # getfattr -d test.txt
  # getfattr -n security.test -d test.txt

And your Samba (smbd) is xattr-ready?
For example the following commands show HAVE_*XATTR line?

# smbd -b | grep SETXATTR
HAVE_FSETXATTR
HAVE_LSETXATTR
HAVE_SETXATTR

---
TAKAHASHI Motonobumo...@samba.gr.jp

All commands successfull.

#mount
/dev/sda4 on /mnt/public type ext3 (rw,nosuid,nodev,acl,user_xattr)

#cd /mnt/public


#getfattr -d hello.txt
# file: hello.txt
user.test=test

#getfattr -n security.test -d hello.txt
# file: hello.txt
security.test=test2


#smbd -b|grep SETXATTR
   HAVE_FSETXATTR
   HAVE_LSETXATTR
   HAVE_SETXATTR

SAMBA ready, but don't change xattr. Very strange with my system.
Also, I joined TT 8414 where is strange with file access rights.

https://bugzilla.samba.org/show_bug.cgi?id=8414

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + acl,user_xattr

2011-12-15 Thread Dmitry Mordovin



Added to global section

vfs objects = acl_xattr


No changes. Still dont store DOS attr.

You only need acl_xattr is you want to store Windows ACLs, not DOS attrs.

Have you tried using setfattr on that filesystem ? Does it work ?

Jeremy.


Hello Jeremy!

You are right!

I don't want to store Windows ACLs, need only DOS attrs (hidden file attr).

What Is enough to add to my smb.conf?
'store dos attributes (S)  or 'map hidden (S)' or together or else?

#cat /opt/samba/smb.conf
[global]
pid directory = /opt/samba/run
lock directory = /opt/samba/cache
private dir = /opt/samba/cache
log file = /opt/samba/smbd.log
log level = 10
workgroup = TEST
security = share
show add printer wizard = no
max log size = 10240
bind interfaces only = true
interfaces = eth1

[homes]
browseable = no
printable = no

[public]
path = /mnt/public
comment = 
read only = no
guest ok = yes
follow symlinks = no
writable = yes

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + acl,user_xattr

2011-12-15 Thread Dmitry Mordovin



Hello Jeremy!

You are right!

I don't want to store Windows ACLs, need only DOS attrs (hidden file attr).

What Is enough to add to my smb.conf?
'store dos attributes (S)  or 'map hidden (S)' or together or else?

I use:

store dos attributes = yes
map readonly = no
map system = no
map hidden = no
map archive = no

Jeremy.


Added to smb.conf

Now, when I try to Apply hidden attribute, popup message - Error change 
file attributes. Access Denied.


I suspect this due to Bug 8414 
(https://bugzilla.samba.org/show_bug.cgi?id=8414) for me.


Thank you.

PS: With hacked version of smbd this error happens too.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Samba + acl,user_xattr

2011-12-09 Thread Dmitry Mordovin

Hello All!

Can't make Samba use acl and extended user attributes to save DOS file 
attributes.


Please, help me configure properly.

My steps on Windows XP:
1 - Open share
2 - Open property of file 1122/22.bmp
3 - Check file attribute: hidden
4 - Click Apply
5 - Click Close

6 - Open property again
7 - Attribute Hidden not checked.

Samba dont save attributes!!!

getfattr -d /mnt/public/1122/22.bmp
Show no any attributes for 22.bmp file

*Environment*

Server configuration:

OS: Ubuntu 10.04.3 LTS 2.6.32-36-generic
Samba: 3.6.1
Share: /mnt/public
Mount: /dev/sda3 on /mnt/public type ext3 (rw,acl,user_xattr)

Unix file permissions:

ls -la /mnt/public/
total 18
drwxrwxrwx 2 nobody nogroup  1024 2011-12-09 14:45 1122
drwx-- 2 root   root12288 2011-12-09 14:43 lost+found

ls -la /mnt/public/1122
total 218
-rwxrwxrwx 1 nobody nogroup 220074 2011-12-09 14:45 22.bmp

Samba config:

[global]
workgroup = HOME
security = share
max log size = 1024
store dos attributes = yes
map archive = no
map read only = no
map hidden = no
map system = no
create mode = 777
directory mode = 777

[homes]
browseable = no
printable = no
store dos attributes = yes

[public]
path = /mnt/public
comment = 
read only = no
guest ok = yes
follow symlinks = no
store dos attributes = yes
writable = yes
map archive = no
map read only = no
map hidden = no
map system = no
create mode = 777
directory mode = 777



Samba configure params: --prefix=/usr/local/samba
...
checking whether to support ACLs... auto
configure: checking whether ACL support is available:
checking for acl_get_file in -lacl... yes
checking for getxattr in -lattr... yes
checking for POSIX ACL support... yes
configure: Using posix ACLs
checking for acl_get_perm_np... no
...

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + acl,user_xattr

2011-12-09 Thread Dmitry Mordovin

On 12/09/2011 04:26 PM, Jonathan Buzzard wrote:

On Fri, 2011-12-09 at 16:05 +0400, Dmitry Mordovin wrote:

[SNIP]


Samba config:

[global]
workgroup = HOME
security = share
max log size = 1024
store dos attributes = yes
map archive = no
map read only = no
map hidden = no
map system = no
create mode = 777
directory mode = 777

[homes]
browseable = no
printable = no
store dos attributes = yes

[public]
path = /mnt/public
comment = 
read only = no
guest ok = yes
follow symlinks = no
store dos attributes = yes
writable = yes
map archive = no
map read only = no
map hidden = no
map system = no
create mode = 777
directory mode = 777

I see no vfs objects = acl_xattr in your Samba config. Without that it
won't work as there is nothing telling Samba where to store the ACL
information.

JAB.



Added to global section

vfs objects = acl_xattr


No changes. Still dont store DOS attr.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Hidden files

2011-04-07 Thread Dmitry Mordovin

Dear All!

Does anyone have troubles with setting hidden attribute?

Read-only set and unset properly
Hindden - can't set at all

mount:
/mnt/disk.img on /drv1 type ext4 
(rw,noexec,nosuid,nodev,loop=/dev/loop0,acl,user_xattr)


Samba 3.5.8

smb.conf

[global]
pid directory = /opt/samba/run
lock directory = /opt/samba/cache
private dir = /opt/samba/cache
log file = /opt/samba/smbd.log
log level = 10
security = share
max log size = 1024000
bind interfaces only = true
interfaces = eth1
smb ports = 445
map hidden = yes

[homes]
browseable = yes
printable = yes

[mnt2]
path = /drv1
read only = no
guest ok = yes


Thanks
Dmitry

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Hidden files

2011-04-07 Thread Dmitry Mordovin

On 04/07/2011 09:55 PM, Jeremy Allison wrote:

On Thu, Apr 07, 2011 at 09:34:48PM +0400, Dmitry Mordovin wrote:

Dear All!

Does anyone have troubles with setting hidden attribute?

Read-only set and unset properly
Hindden - can't set at all

You have:

map hidden (S)

This controls whether DOS style hidden files should be mapped to
the UNIX world execute bit.

set, on a filesystem on which you have mounted noexec.

Can you see the problem here ? :-).

You need to add store dos attributes = yes
to store the DOS attribute bits into extended attributes.

Jeremy.

Thank you Jeremy!!!

Works fine!

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Disk full / file corrupted

2011-04-04 Thread Dmitry Mordovin



I cannot reproduce your problem in my Samba 3.5.8 box.

Anyway strict allocate = yes maybe solve your problem.

---
TAKAHASHI Motonobumo...@monyo.com


Hello

I prepare 50MB disk image.

The test.bmp file exists in the root of disk.

Step 1: Mount image on same server where samba:
Disk image here:
http://www.2shared.com/file/WPs5R8Rk/disk_ext4.html

mkdir /mnt/test_disk_ext4

mount -o loop disk_ext4.img /mnt/test_disk_ext4

Step 2: My smb.conf:

[global]
pid directory = /opt/samba/run
lock directory = /opt/samba/cache
private dir = /opt/samba/cache
log file = /opt/samba/smbd.log
log level = 0
workgroup = HOME
server string = Home storage
security = share
load printers = no
printcap name = /dev/null
printing = bsd
disable spoolss = yes
enable spoolss = no
show add printer wizard = no
max log size = 102400
dns proxy = no
allocation roundup size = 0
strict allocate = yes
nt acl support = no
bind interfaces only = true
interfaces = eth0
smb ports = 139
socket options = SO_REUSEADDR TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
unix extensions = no
nt pipe support = no
map hidden = yes
hide dot files = no

[homes]
browseable = yes
printable = no

[test]
path = /mnt/test_disk_ext4
comment = 
read only = no
guest ok = yes
follow symlinks = no

Step 3: Map shared test as network drive on your PC (Win XP in my 
case, Vista+ not tested)


Step 4: To reproduce problem - just edit test.bmp (Right click, choose 
Edit), set new bigger image size and save.

Paint must alert - disk space not enough / disk full.
After all - test.bmp file not readable and file size increased.

Thank you.
Dmitry


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Disk full / file corrupted

2011-04-01 Thread Dmitry Mordovin

Hello!

Sorry if I repeated.

I have next problem with Samba 3.5.8

*Scenario:*
- CentOS 5.5
- Mounted disk image with loop device to /mnt/.sharedDisk

mount (output)
/SharedDiskImage.img on /mnt/.sharedDisk type vfat 
(rw,noexec,nosuid,nodev,loop=/dev/loop0,uid=99)


df -h (output)
FilesystemSize  Used Avail Use% Mounted on
/SharedDiskImage.img 128M  128M  1.5K 100% /mnt/.sharedDisk

- Avail 1.5K space
- I was test with vfat, ext3, ext4 file system.

Samba share /mnt/.sharedDisk folder.

On my windows XP pc I map this share as network drive.
In drive properties I see, avail only 1.5K free disk space

However, I can open existed BMP image (10K size) with MS Paint, resize 
image and save. Paint alert me disk is full.

Now my BMP image size is 54K, and corrupted.

Why 54K if only 1.5K avail?

Above example with MS Paint.
If I use MS Wordpad in same scenario (Save more data than avail) Wordpad 
alert me in half of the cases.


This problem is very important for me.

I thinking, this problem with Paint and Wordpad and have been do some 
alternative test.


I create virtual disk on local XP machine, and try same scenario, Paint 
and Wordpad works well. They alert about disk full and not rewrite early 
saved file.

So, I don't loss saved file.

Does it possible to solve this problem?

Thanks
Dmitry

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba