Bug#623119: libsane: Problem with setting of device node permissions

2011-05-14 Thread wzab

Package: libsane
Version: 1.0.22-2
Followup-For: Bug #623119

I had also problem with the permission of scanner device node.

Investigating the problem I have found that:
1. The original 60-libsane.rules doesn't work because the setfacl program
   is available as /usr/bin/setfacl, not as /bin/setfacl
2. setfacl is not able to modify permissions of device node:
   When I ran it from command line, I get the following error:
   #/usr/bin/setfacl -m g:scanner:rw snanner_device_node
   setfacl: 002: Operation not supported

I thought, that the second problem is caused by the fact, that my kernel
has the following configuration:
# CONFIG_TMPFS_POSIX_ACL is not set
But I've tested it on the regular file in my reiserfs root filesystem
and got the same result:

#/usr/bin/getfacl  /root/test
getfacl: Removing leading '/' from absolute path names
# file: root/test
# owner: root
# group: root
user::rw-
group::r--
other::r--
#/usr/bin/setfacl -m g:scanner:rw /root/test
setfacl: /root/test: Operation not supported

I've checked, that ACLs for reiserfs are on:
CONFIG_REISERFS_FS_POSIX_ACL=y

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.37.3 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=pl_PL.utf8, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libsane depends on:
ii  acl  2.2.49-4Access control list utilities
ii  adduser  3.112+nmu2  add and remove users and groups
ii  libavahi-client3 0.6.30-3Avahi client library
ii  libavahi-common3 0.6.30-3Avahi common library
ii  libc62.11.2-11   Embedded GNU C Library: 
Shared lib

ii  libexif120.6.20-1library to parse EXIF files
ii  libgphoto2-2 2.4.11-2gphoto2 digital camera library
ii  libgphoto2-port0 2.4.11-2gphoto2 digital camera port 
librar
ii  libieee1284-30.2.11-7+b1 cross-platform library for 
paralle
ii  libjpeg626b1-1   The Independent JPEG 
Group's JPEG
ii  libtiff4 3.9.5-1 Tag Image File Format 
(TIFF) libra
ii  libusb-0.1-4 2:0.1.12-17 userspace USB programming 
library
ii  libv4l-0 0.8.3-2 Collection of video4linux 
support

ii  makedev  2.3.1-89creates device files in /dev
ii  udev 167-3   /dev/ and hotplug 
management daemo


Versions of packages libsane recommends:
ii  libsane-extras1.0.22.1   API library for scanners -- 
extra
ii  sane-utils1.0.22-2   API library for scanners -- 
utilit


Versions of packages libsane suggests:
ii  avahi-daemon  0.6.30-3   Avahi mDNS/DNS-SD daemon
pn  hplip none (no description available)
pn  hpoj none (no description available)

-- Configuration Files:
/etc/sane.d/snapscan.conf changed:
firmware /usr/local/wzab/scanner/U126V043.BIN
scsi AGFA * Scanner
scsi COLOR * Scanner
scsi Color * Scanner
scsi ACERPERI * Scanner
usb 0x04a5 0x1a20
usb 0x04a5 0x1a26
usb 0x04a5 0x2022
usb 0x04a5 0x1a2a
usb 0x04a5 0x2040
usb 0x04a5 0x2060
usb 0x04a5 0x207e
usb 0x04a5 0x20be
usb 0x04a5 0x20c0
usb 0x04a5 0x20b0
usb 0x04a5 0x20de
usb 0x04a5 0x20f8
usb 0x04a5 0x20fc
usb 0x04a5 0x20fe
usb 0x04a5 0x2137
usb 0x06bd 0x0002
usb 0x06bd 0x0001
usb 0x06bd 0x2061
usb 0x06bd 0x2093
usb 0x06bd 0x2091
usb 0x06bd 0x2095
usb 0x06bd 0x2097
usb 0x06bd 0x208d
usb 0x06bd 0x20ff
usb 0x06bd 0x208f
usb 0x06bd 0x20fd
usb 0x04b8 0x0114
usb 0x04b8 0x011f
usb 0x04b8 0x0121
usb 0x04b8 0x0122
usb 0x04b8 0x080c


-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#623119: libsane: Problem with setting of device node permissions

2011-05-14 Thread Wojciech Zabolotny CERN

Package: libsane
Version: 1.0.22-2
Followup-For: Bug #623119

To have the ACL working, I need to remount the particular filesystem 
with acl flag.

The following fixed operation of setfacl with my test file:

wzab:~# mount -o remount,acl /
wzab:~# /usr/bin/setfacl -m g:scanner:rw /root/test
wzab:~# /usr/bin/getfacl  /root/test
getfacl: Removing leading '/' from absolute path names
# file: root/test
# owner: root
# group: root
user::rw-
group::rw-
group:scanner:rw-
mask::rw-
other::r--

So to make the original 60-libsane.rules working, one should:

first correct the path to setfacl utility, and

next - ensure that the kernel is compiled with
CONFIG_TMPFS_POSIX_ACL=y,
and that /etc/init.d/udev mounts the /dev filesystem with acl flag
which AFAIK is not the case:

 quoting from /etc/init.d/udev =

# mount a tmpfs over /dev, if somebody did not already do it
mount_tmpfs() {
  if grep -E -q ^[^[:space:]]+ /dev (dev)?tmpfs /proc/mounts; then
mount -n -o remount,${dev_mount_options} -t tmpfs tmpfs /dev
return
  fi

  if ! mount -n -o $dev_mount_options -t tmpfs tmpfs /dev; then
log_failure_msg udev requires tmpfs support, not started.
log_end_msg 1
  fi

  return 0
}

[...]

dev_mount_options='mode=0755'
if [ $tmpfs_size ]; then
  dev_mount_options=size=${tmpfs_size},${dev_mount_options}
fi





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#623119: libsane: Problem with setting of device node permissions

2011-05-14 Thread Julien BLACHE
notfound 623119 1.0.22-2
tags 623119 - patch
close 623119
thanks

wzab w...@ise.pw.edu.pl wrote:

Hi,

 1. The original 60-libsane.rules doesn't work because the setfacl program
is available as /usr/bin/setfacl, not as /bin/setfacl

setfacl and friends moved to /bin in acl 2.2.49-4 and libsane has a
versioned dependency on it.

 2. setfacl is not able to modify permissions of device node:
When I ran it from command line, I get the following error:
#/usr/bin/setfacl -m g:scanner:rw snanner_device_node
setfacl: 002: Operation not supported

 I thought, that the second problem is caused by the fact, that my kernel
 has the following configuration:
 # CONFIG_TMPFS_POSIX_ACL is not set

It is indeed required. If you are running your own kernel build, you'd
better look at the Debian kernel config.

Closing, no issue here.

JB.

-- 
 Julien BLACHE - Debian  GNU/Linux Developer - jbla...@debian.org 
 
 Public key available on http://www.jblache.org - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org