Sponsored Content
Top Forums UNIX for Advanced & Expert Users changing UGO to ACLs on a file Post 302289315 by davchris on Thursday 19th of February 2009 09:01:42 AM
Old 02-19-2009
changing UGO to ACLs on a file

Hello,

I have a directory and a list of files in it on which I'd like to set ACLs and quota.
To set ACLs regarding the UGO rights set at the moment, I haven't found any other way than grabbing the UGO rights set on the file with a shell cut command and then applying setfacl commands to that file
i.e :

-rwxr-xr-x toto

u=`ls -l toto | awk ' { print $1 } ' | cut -c2-4`
g=`ls -l toto | awk ' { print $1 } ' | cut -c5-7`
o=`ls -l toto | awk ' { print $1 } ' | cut -c8-10`

then ...
echo "setfacl -m u:$u,g:$g,o:$o toto" > /tmp/acllist

then
setfacl -f /tmp/acllist toto

Is there a way to transpose existing UGO rights onto ACLs directly on the file ?

Thanks a lot
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

changing csv file contents to file of rows

i have a file a.txt contents as 1,2,3,4,......etc...in a single line, i want to write to another file in rows as 1 2 3 4 5 can u help? i do not know the length of a.txt (4 Replies)
Discussion started by: pravfraz
4 Replies

2. UNIX for Dummies Questions & Answers

Changing file content based on file header

Hi, I have several text files each containing some data as shown below: File1.txt >DataHeader Data... Data... File2.txt >DataHeader Data... Data... etc. What I want is to change the 'DataHeader' based on the file name. So the output should look like: File1.txt >File1 ... (1 Reply)
Discussion started by: Fahmida
1 Replies

3. Emergency UNIX and Linux Support

Squid acls

Hi guys, There is a line in squid default configuration: # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports acls are applied from top down, so CONNECT acl will deny access to all non SSL and SSL ports. I mean it never reaches the second access rule. (0 Replies)
Discussion started by: majid.merkava
0 Replies

4. Red Hat

Chmod overiding default ACLs.

Afternoon all, This should be a simple task. I have set up default acls on a directory to allow user user1 to read it. This directory is owned by root:root. setfacl -d -m u:user1:rx /directory I also did via the group. This works fine, new files made by root are readable. ... (4 Replies)
Discussion started by: snoop6060
4 Replies

5. Solaris

ZFS ACLS and vim

Hi, Does anyone know a way of making vim preserve ZFS NFSv4 ACLS? Without disabling file backups in vim that is. Thanks in advanced. (10 Replies)
Discussion started by: akame
10 Replies

6. UNIX for Advanced & Expert Users

Does regular Linux installation in fact uses any ACLs in any file/dir?

Hi everybody As the title says I wonder if the usual (in my case Ubuntu 14.04 LTS) linux installation root does in fact uses any of the ACLs possible extensions in any of its files/dirs I ask this because I usually use tar to backup the entire root (in offline) with a command like this (root... (2 Replies)
Discussion started by: man-walking
2 Replies

7. Red Hat

ACLs - How can i create new executable files

Hello experts, I would like to know if is possible to create a default acl rule to a directory. in this directory all files created should have executable permissions by the group IT. i tried setfacl -m d:g:it:rwx /files tried to change the mask setfacl -m m::rwx /files but i still... (3 Replies)
Discussion started by: berveglieri
3 Replies

8. Red Hat

Is there limit on number of ACLs' per directory in Redhat

I work on a distribution application on Linux which generates bulk reference data extract feeds and stores them on a Linux server. I have several consumer applications access the files stored on this Linux server using FTPS protocol. However in order for consumer applications to have access to... (2 Replies)
Discussion started by: waavman
2 Replies

9. AIX

Unable to set ACLs on sulog - need to grant read permission to a normal user on AIX 6.1

Hi, I need to grant read permission to a normal user on sulog file on AIX 6.1. As root I did acledit sulog and aclget shows "extended permissions" as "enabled" and normal user "splunk" has read permissions. When I try to access sulog as splunk user it won't allow and aclget for splunk user... (6 Replies)
Discussion started by: prvnrk
6 Replies
bamg2geo(1rheolef)						    rheolef-6.1 						bamg2geo(1rheolef)

NAME
bamg2geo - convert bamg mesh in geo format SYNOPSIS
bamg2geo options input[.bamg] input[.dmn] bamg2geo options input[.bamg] -Cl domlabel bamg2geo options input[.bamg] {-dom domname}* DESCRIPTION
Convert a bamg `.bamg' into `.geo' one. The output goes to standart output. The `.dmn' file specifies the domain names, since bamg mesh generator uses numbers as domain labels. EXAMPLE
bamg -g toto.bamgcad -o toto.bamg bamg2geo toto.bamg toto.dmn > toto.geo BAMG CAD FILE
This file describe the boundary of the mesh geometry. A basic example writes (See bamg documentation for more); MeshVersionFormatted 0 Dimension 2 Vertices 4 0 0 1 1 0 2 1 1 3 0 1 4 Edges 4 1 2 101 2 3 102 3 4 103 4 1 104 hVertices 0.1 0.1 0.1 0.1 DOMAIN NAME FILE
This auxilliary `.dmn' file defines the boundary domain names as used by Rheolef, since bamg uses numeric labels for domains. EdgeDomainNames 4 bottom right top left THE DOMAIN NAME FILE CAN ALSO SPECIFY ADDITIONAL VERTICES DOMAIN
EdgeDomainNames 4 bottom right top left VerticeDomainNames 4 left_bottom right_bottom right_top left_top Vertice domain names are usefull for some special boundary conditions. OPTIONS
-upgrade -noupgrade Default is to output a version 2 `.geo' file format. See geo(1). With the -noupgrade, a version 1 file format is assumed. -dom dom1 ... -dom domN SEE ALSO
geo(1) rheolef-6.1 rheolef-6.1 bamg2geo(1rheolef)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy