Operating System - HP-UX
1825662 Members
3425 Online
109686 Solutions
New Discussion

ACL or set derectory permissions issue

 
bdore
Occasional Visitor

ACL or set derectory permissions issue

Can a directory ACL or set derectory permissions be created, so that all files created in a 
directory will be forced to have world readable set .

 example:-

ls -l /u26/app/BIA22/OracleBIData/web | grep log

drwx------   3 orabia22   dba           1024 Jan 22 09:09 log

 

so any file created in this directory would be readable by all?

3 REPLIES 3
bdore
Occasional Visitor

Re: ACL or set derectory permissions issue

Just clarifying that this is an HPUX 11.31 server

Matti_Kurkela
Honored Contributor

Re: ACL or set derectory permissions issue

Assuming that the filesystem used is JFS (also known as VxFS),this should be possible by setting a "default ACL" on the directory:

setacl -m default:other:r-- /u26/app/BIA22/OracleBIData/web/log

See "man aclv" and "man setacl" for more details.

 

Note that "man acl" and "man chacl" talk about HFS ACLs, and the HFS filesystem type is fairly uncommon these days (the /stand filesystem of PA-RISC servers is required to be HFS, but you usually don't need ACLs on it...)

MK
bdore
Occasional Visitor

Re: ACL or set derectory permissions issue

Tried setting the acl as suggested but the file created did not have world read set?

 

 

{ignite} root> # pwd
/home/briand

{ignite} root> # mkdir test

{ignite} root> # ls -l | grep test

drwx------   2 root       sys             96 Feb  1 11:06 test

{ignite} root> # setacl -m default:other:r-- test

{ignite} root> # ls -l | grep test |

drwx------+  2 root       sys             96 Feb  1 11:06 test

{ignite} root> # touch test/a

{ignite} root> # ls -l test
total 0
-rw-------   1 root       sys              0 Feb  1 11:07 a