LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices


Reply
  Search this Thread
Old 08-28-2008, 05:32 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question set ACL recursively on a directory ??


Hi all,

I need to apply acl on for a particular user recursively on a directory.

Pls help.


At present, when I am using command

Code:
setacl -m user:ABC:rwx /any/path
it is just setting acl on that directory, not on the files/folders in it.


Pls help, I did some google work, but could not find anything useful.

Thanks in adv.
VIKAS
 
Old 08-28-2008, 10:31 PM   #2
/usr/darien
Member
 
Registered: Mar 2008
Location: Virginia
Distribution: RHEL 4/5, Fedora 6-9, SuSE 10.1-11, Open Solaris 10.8, WinXP,2003,Vista
Posts: 59

Rep: Reputation: 15
Type setfacl –help to see the options. The –R option sets recursive permissions.

Code:
setacl -Rm user:ABC:rwx /any/path

Last edited by /usr/darien; 08-28-2008 at 10:33 PM.
 
Old 08-29-2008, 05:01 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Unhappy

Quote:
Originally Posted by /usr/darien View Post
Type setfacl –help to see the options. The –R option sets recursive permissions.

Code:
setacl -Rm user:ABC:rwx /any/path
Yes, this works fine in Linux, BUT I am on HP-UX m/c.
I am getting this error.
Code:
nmx002 22: setacl -Rm user:aj172714:rwx /tmp/abc
setacl: illegal option -- R

usage: setacl [-rn]
              [-m [[d[efault]:]u[ser]::operm | perm[,]]
                  [[d[efault]:]u[ser]:uid:operm | perm[,...]]
                  [[d[efault]:]g[roup]::operm | perm[,]]
                  [[d[efault]:]g[roup]:gid:operm | perm[,...]]
                  [[d[efault]:]c[lass]:operm | perm[,]]
                  [[d[efault]:]o[ther]:operm | perm]]
              [-d [[d[efault]:]u[ser]:uid[,...]]
                  [[d[efault]:]g[roup]:gid[,...]]
                  [[d[efault]:]u[ser]::[,]]
                  [[d[efault]:]g[roup]::[,]]
                  [[d[efault]:]c[lass]:[,]]
                  [[d[efault]:]o[ther]:[,]]]
              object(s)

        or

       setacl [-rn]
              -s u[ser]::operm | perm[,]
                 [d[efault]:u[ser]::operm | perm[,]]
                 g[roup]::operm | perm[,]
                 [d[efault]:g[roup]::operm | perm[,]]
                 c[lass]:operm | perm[,]
                [d[efault]:c[lass]:operm | perm[,]]
                 o[ther]:operm | perm[,]
                 [d[efault]:o[ther]:operm | perm[,]]
                 [[d[efault]:]u[ser]:uid:operm | perm[,...]]
                 [[d[efault]:]g[roup]:gid:operm | perm[,...]]
              object(s)

        or

       setacl [-rn] -f file_name object(s)
nmx002 23:

Pls suggest.

Thanks.
 
Old 08-29-2008, 05:50 AM   #4
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
# find /any/path -exec setacl -m user:ABC:rwx {} ';'
 
Old 08-30-2008, 05:41 AM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Smile

Quote:
Originally Posted by vermaden View Post
# find /any/path -exec setacl -m user:ABC:rwx {} ';'
Thanks, this solved my issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Search a string recursively under one directory say_hi_ravi Programming 6 07-09-2008 04:47 AM
Using cp to copy directory permissions recursively? SirTristan Linux - Newbie 3 11-25-2007 08:36 AM
How to Recursively Set Permissions for Directories Only edwin11 Linux - Software 4 12-30-2005 09:54 AM
Changing owner of a directory recursively? fturcic Linux - General 2 02-01-2005 07:13 AM
How to count line numbers recursively in a directory? puzz_1 Linux - General 1 07-01-2004 09:43 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration