Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I Tried out to create default permission for newly created file and folder permission by using acl,But i could not find acl permission enabled for user in the group .Any file created in folder /sysadmin does not hold rwx for the group user user1 & user2
If your running EXT2/3 Filesystem you will need to enable ACLS and remount;
do this by editing
/etc/fstab
Quote:
/dev/md1 / ext3 defaults 1 1
to
/dev/md1 / ext3 rw,acl 1 1
basically change defaults to rw,acl.
This will make it persistant (stays after reboot) but you can make it effective now by running;
Quote:
mount -v -o remount /
It looks as though you basically want rwx permissions for anyone in the sysadmin group. Adding ACLS for each user is nice, but its better practice to do for groups, and add a user to that group. You can add individual permissions later
Lets clear your current config first;
Quote:
setfacl -R -b /dir/sysadmin
now check that user1 & user2 are added to your sysadmin group
Quote:
less /etc/groups
you should see something like
Quote:
sysadmin:x:503:user1,user2
The important bit is they have both names at the end.
• You can use getfacl to check whether the intended permissions were set in the correct way.
• Was the user1 already logged in? The secondary groups are set during the login. The command id will tell what’s actually set for user1.
• For ext2/ext3 it’s also possible to define default mount options by tune2fs. This can include acl – and while ACLs are applied, this won’t show up in the output of mount command then.
I had made a entry for acl in fstab and executed mount -v -o remount / .Even i had made a soft reboot of my server .But still i could find find the acl enabled .
@gmlwall : I tried the things what you had posted above.But seems not to be working [/B]
Quote:
root@Little-desktop:~# less /etc/group | grep "sysadmin"
sysadmin:x:1003:user1,user2
root@Little-desktop:~# setfacl -R -b /sysadmin
root@Little-desktop:~# setfacl -R -m g:sysadmin:rwx /sysadmin
root@Little-desktop:~# su - user1
No directory, logging in with HOME=/
$ bash
user1@Little-desktop:/sysadmin$ touch user1
user1@Little-desktop:/sysadmin$ ls -al
total 8
drwxrwxr-x+ 2 root root 4096 2012-08-16 11:12 .
drwxr-xr-x 23 root root 4096 2012-08-16 11:02 ..
-rw-r--r-- 1 user1 user1 0 2012-08-16 11:12 user1
Quote:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation UUID=4434554a-c818-45d6-a252-c008aace1f57 / ext3 acl,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=fcf6b15d-a70d-4968-b16a-3e34ca4499bd /boot ext3 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=fb15c1a4-fb3c-4ca3-b948-65ab980d9c65 none swap sw
when i executed mount command i could find the acl enabled for /
Quote:
#mount /dev/sda6 on / type ext3 (rw,acl,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda1 on /boot type ext3 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/Little/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=Little)
Last edited by LittleMaster; 08-16-2012 at 10:18 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.