Sponsored Content
Full Discussion: Restrict user access
Operating Systems Linux Red Hat Restrict user access Post 302583395 by verdepollo on Tuesday 20th of December 2011 10:33:10 AM
Old 12-20-2011
Before you can assign an ACL, you have to make sure that the filesystem supports them:
Code:
tune2fs -l /dev/sdX/ | grep options

If you run mount you may also get the details. There should be an "acl" option somewhere in the mount options.

If it does not support ACLs, you can always remount the filesystem:

Code:
mount -o remount,acl /usr/sap

Having said so, your ACL command is almost correct:
Code:
setfacl -m d:u:ZODCIFUSR:r /usr/sap

When an ACLs (POSIX ACL) is set on a directory, all new files created inside inherit the default ACL. If for some reason you want to copy a file that has an ACL to a directory that does not use ACLs, both cp -p and mv will preserve the original ACL.

Last edited by verdepollo; 12-20-2011 at 04:59 PM..
This User Gave Thanks to verdepollo For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

restrict tcp-port access

Hi Is there any way to restrict the TCP-IP port usage. I want to restrict TCP-IP port 1500/1550 to the oracle osuser. Tanks in advance. Remi (2 Replies)
Discussion started by: remivisser
2 Replies

2. HP-UX

How to restrict a user group to access the kernel

Hi, Please any one can help me to know that how we can restrict a user group to access the kernel at all. (0 Replies)
Discussion started by: harishankar
0 Replies

3. Red Hat

restrict access of a user to two directories only

Hi all, I am using RHEL 5.0 I need a user say test to have full access to two directories, say /tmp1 & /tmp2 only other than his home directory. I do not want to change his login shell which is ksh or bash by default. Moreover, he should not even have read access of other directories. ... (10 Replies)
Discussion started by: vikas027
10 Replies

4. UNIX for Advanced & Expert Users

Restrict FTP access to a single directory for only one user.

Hi All, It will be very great if you can help me in this issue. Thanks in advance. I need to enable FTP on a solaris9 server. I need to create a new user some "xxxxxx" and he can only FTP the files to and from between /tftpboot directory and network devices. Other users should not... (8 Replies)
Discussion started by: santhoshkumar_d
8 Replies

5. UNIX for Dummies Questions & Answers

Restrict user access to their home dir

Hi! i'm using FreeBSD 6.2 and hosting my pc to frens in particular of sensitive information being saved to the PC, i would like to know is it possible for me to restrict user access to their /home dir. only? and also, i wanted to restrict them listing files under /etc thanks all! (10 Replies)
Discussion started by: rdns
10 Replies

6. UNIX for Advanced & Expert Users

Restrict access to specific users.

Hi All! I would like to know if there is any specific way by which I can restrict access to apecific users (ip addresses). OS : Red hat linux Thanks! nua7 (6 Replies)
Discussion started by: nua7
6 Replies

7. UNIX for Advanced & Expert Users

Restrict Access to the folder

Hi I have requirement to create 3 new users on my server but to restrict their access to a set of particular folders. /export/home/kapil/shared, /export/home/kapil/shared/Folder1 /export/home/kapil/shared/Folder2 These folders should be accessible to all the 3 users and to me too.... (1 Reply)
Discussion started by: kapilk
1 Replies

8. UNIX for Dummies Questions & Answers

Restrict user access.

Hi All, How can we restrict a particular user access to a particular shell in solaris 10. Thanks in Advance. (5 Replies)
Discussion started by: rama krishna
5 Replies

9. Ubuntu

Restrict SUDO Access

Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Hi Folks, Please help me. I am bit struck here. Here is the OS info. Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux I have a... (17 Replies)
Discussion started by: explorer007
17 Replies

10. UNIX for Dummies Questions & Answers

Restrict access

I'm trying to use squid to restrict elinks' access to certain websites(only http traffic). I have tried some configs in squid.conf but no luck. Hope someone has a bit of time to explain me how can you make these config's :) ---------- Post updated at 05:40 PM ---------- Previous update was at... (1 Reply)
Discussion started by: Birnbacher
1 Replies
acl_set_file(3) 					     Library Functions Manual						   acl_set_file(3)

NAME
acl_set_file - Sets the ACL on the file or directory designated by the path name LIBRARY
Security Library (libpacl.a) SYNOPSIS
#include <sys/acl.h> int acl_set_file( char *path_p; acl_type_t type_d; acl_t acl_d); PARAMETERS
The pathname of the file or directory to set the ACL on. Designates the type of ACL to set: ACL_TYPE_ACCESS, ACL_TYPE_DEFAULT, or ACL_TYPE_DEFAULT_DIR. Working storage internal representation of the ACL that is being set. DESCRIPTION
NOTE: This function is based on Draft 13 of the POSIX P1003.6 standard. Given a path name to a file or directory, the acl_set_file() function sets the designated ACL. The type of ACL being set is determined by the type_d parameter. If acl_d is NULL, then the designated ACL is removed from the designated file or directory. The entry pointer used by the acl_get_entry() function becomes undefined after a call to the acl_set_file() function. RETURN VALUES
Upon successful completion, the acl_set_file() function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If any of the following conditions occur, the acl_set_file() function sets errno to the corresponding value: The required access to the file was denied. The named file or directory does not exist. The argument acl_d does not contain a valid ACL. Argument type_d does not contain a valid ACL type. The pathname is longer than allowed. The directory or file system that would contain the new ACL cannot be extended or the file system is out of file allocation resources. The argument type_d indicates a default ACL, and path_p does not point to a directory. The designated file or directory resides on a file system that does not support ACLs The process does not have the appropriate permissions to perform the operation. The setting and changing of ACLs have been disabled by the system administrator. The designated file or directory resides on a read-only file system. RELATED INFORMATION
acl_get_fd(3),acl_valid(3), acl_set_fd(3), acl_get_file(3) Security delim off acl_set_file(3)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy