Unix File Access Right


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix File Access Right
# 8  
Old 10-05-2011
Unix File Access Right

Linux sitelinux32 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
# 9  
Old 10-05-2011
Hi, have a look at: man getfacl and man setfacl
# 10  
Old 10-05-2011
Unix File Access Right

This is my getfacl
# file: _fsrt3
# owner: jessy
# group: jessy
user::rw-
group::r--
mask::rwx
other::r--

1. When i try to setfacl -b _fsrt3, the + sign is still there, how am i going to get rid of the + sign?

2.Besides, how am i going to modify those user, group and other also? i mean the syntax of command like setfacl -m user::jessy group:: xxxxxx ?

3. What does the mask means for?
# 11  
Old 10-06-2011
1. try setfacl -k _fsrt3

2. you can still change ownership and group ownership and permissions using chown and chmod

3. the mask shows what permissions are allowed for this file, rwx means you are able to set all permissions on the file. if it was set to r-x you could tell the file to use mask defaults to disble write to the file/directory. In this instance it doesn't affect the permissions of the file.
# 12  
Old 10-07-2011
I try setfacl -k filament. It still can't work for me.
# 13  
Old 10-07-2011
Quote:
Originally Posted by Tommyk
1. try setfacl -k _fsrt3

2. you can still change ownership and group ownership and permissions using chown and chmod

3. the mask shows what permissions are allowed for this file, rwx means you are able to set all permissions on the file. if it was set to r-x you could tell the file to use mask defaults to disble write to the file/directory. In this instance it doesn't affect the permissions of the file.
1-)
Code:
# setfacl -b infile

Code:
-b, --remove-all
           Remove all extended ACL entries. The base ACL entries  of  the

owner,
group and others are retained.

2 && 3-)
Code:
# ls -l infile && getfacl infile
-rw-r--r-- 1 root root 0 Oct  7 14:56 infile
# file: infile
# owner: root
# group: root
user::rw-
group::r--
other::r--
## at the now acl mask is not ready.


Code:
# setfacl -m u:jboss:rw infile
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:rw-
group::r--
mask::rw-
other::rw-
## at the now acl mask is ready.
so mask means acl extendend perms is active on this file and it is "rw"..

Code:
# setfacl -x g:jboss infile   ## remove acl perms belong to group who is jboss on the file 
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:rw-
group::r--
mask::rw-
other::rw-

Code:
# setfacl -m u:jboss:rwx infile ## jboss user's permission is now rwx on acls
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:rwx
group::r--
mask::rwx
other::rw-

Code:
# setfacl -m g:jboss:r infile ## jboss group's permission is now "r" on acls
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:rw-
group::r--
group:jboss:r--
mask::rw-
other::rw-
## at the now mask is "rw" for acl perms


Code:
# setfacl -m g:jboss:rwx infile ## jboss group's permission is now rwx on acl
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:rw-
group::r--
group:jboss:rwx
mask::rwx
other::---
## at the now mask is rwx!


Code:
# mkdir test
# setfacl -m d:u:jboss:w test/  ## all files and directorys inherits acl perms from our folder for jboss user 
# touch test/file{1..3}

# getfacl test/file{1..3}

# file: test/file1
# owner: root
# group: root
user::rw-
user:jboss:-w-
group::r-x                      #effective:r--
mask::rw-
other::r--

# file: test/file2
# owner: root
# group: root
user::rw-
user:jboss:-w-
group::r-x                      #effective:r--
mask::rw-
other::r--

# file: test/file3
# owner: root
# group: root
user::rw-
user:jboss:-w-
group::r-x                      #effective:r--
mask::rw-
other::r--


Code:
# setfacl -m u:jboss:--- infile  ##  remove jboss user's acls
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:---
group::r--
mask::r--
other::---

## or

# setfacl -m u:jboss:0 infile  ## same effect
# getfacl infile
# file: infile
# owner: root
# group: root
user::rw-
user:jboss:---
group::r--
mask::r--
other::---
## at the now jboss user has not any acl perms.

Code:
quick summary
m--> modify
x--> remove

u --> user  : jboss : rwx  infile --> ( setfacl -m u:jboss:--- infile )
g --> group : users : rw file/folder -->  ( setfacl -m g:users:rw infile )
o --> others ::rw file / folder  --> ( setfacl -m o::rw test)

regards
ygemici
# 14  
Old 10-19-2011
Unix File Access Right

Hi ygemici,

Thanks for your explanation.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Virtualization and Cloud Computing

Need to use UNIX to access a file from "the cloud"

Normally files are given to us via FTP and we use a program (DMX) to pull that file into our database. I have been told that we will be receiving a new file via "the cloud" and I need to prepare a method to access and otherwise process this file using UNIX/LINUX. I realize my request raises more... (1 Reply)
Discussion started by: craigwg
1 Replies

2. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

3. Programming

Unix File has 000 access when written

Good day! I would just like to ask about an issue I encountered. There is a Java program (version1.3) that we use that is hosted in Unix (HP-UX B.11.11 U), and one of its functions copies a file and writes it to another directory. It usually runs fine, but one day, it wrote a file that had 000... (2 Replies)
Discussion started by: mike_s_6
2 Replies

4. Shell Programming and Scripting

file access in unix..please help

Hi im using solaris. In ma unix system i had a perl file called cleanup.pl which deleted all my files in my system.Is there a way to know when this file was accessed( rather executed ) and by which user ???? basically i wan to know a way to know which user had accessed( or run the particular perl... (1 Reply)
Discussion started by: Anuj8584
1 Replies

5. Shell Programming and Scripting

How do I access the create date from Windows after the file has been FTP'd to UNIX ?

I run an application that creates a hostname_log.txt file on the c:\ of each windows workstation. At the end of each day, these log files are FTP'd to a directory on a UNIX box. When I run "ls -lrt", the timestamp that is displayed is the timestamp that the FTP occured, not the timestamp... (2 Replies)
Discussion started by: gavman99
2 Replies

6. Filesystems, Disks and Memory

Unix Sco Open Server, Windows Computers Problem Access Unix Shared Files Help!!!!!

Hello Moto I hope someone can help We's here at work, have a unix box with sco openserver 5 on it, so it has a nice gui interface.. and also a fair few windows computers.. a system admin guy b4 me, has set up a user called neil, which can, when u try to access the unix box using windows... (2 Replies)
Discussion started by: haggo
2 Replies

7. UNIX for Dummies Questions & Answers

how to share the unix file for other client 's access

Hi , I am new to the unix . And right now I have a unix machine "test" . I want to share a folder in the /opt/example .AND I hope when I use a windows machine to access the unix machine ,ep:start->cmd->\\test,I can see the shared folder "example", what shall I do thanks :) (2 Replies)
Discussion started by: floopw
2 Replies

8. UNIX for Dummies Questions & Answers

Need Someone With Access To Unix Terminal

Any chance someone could look up the Whois for www.weddingchannel.la and www.art.la at the following link: whois -h whois.afilias-grs.info domainname.la Thanks in advance!!! rdm (4 Replies)
Discussion started by: rdm
4 Replies

9. UNIX for Dummies Questions & Answers

Using Access on Unix

Hi everybody, my question is how to run an Access Database under Unix? I need to do that for a Web Application. Links or anything about this topic would be helpful!!! thanx luna (3 Replies)
Discussion started by: luna
3 Replies
Login or Register to Ask a Question