Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to give permissions to read write but not delete the file? Post 302981121 by xbin on Wednesday 7th of September 2016 12:38:32 PM
Old 09-07-2016
NFSv4 ACLs can to the job but that depends on whether your OS supports them.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read and write from a file

I have tried to show the file name whose size is greater than 200 byte in current directory. Please help me. ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt #set -a x `cat out.txt` i=0 `cat out.txt` | while do read x echo $x #re=200 j=0 if }" < "200" ] then echo $j j=`expr $j... (2 Replies)
Discussion started by: rinku
2 Replies

2. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

3. Filesystems, Disks and Memory

Export a file system with write permissions

Hi, Is there a way we can export a file system with write permissions for only one user. For eg. we have many users on the network, but only user2 should have write permissions on the exported file system and for others it should be read-only. (7 Replies)
Discussion started by: jredx
7 Replies

4. Shell Programming and Scripting

How to give permissions to an open file in vi editor?

Hi all, I have a shell script that i started editing, only in the midst of which i tried to save the changes i found that the file wasnt been provided with write/execute permissions. I later have redone the changes and saved the file- Just curious to know if there was any command wherein... (5 Replies)
Discussion started by: Pankajakshan
5 Replies

5. UNIX for Dummies Questions & Answers

Default read/write/execute permissions

I am perplexed that my script execution is not always consistent in creating new files. Specifically, my group read/write/execute permissions. For instance, take a look at the following: -rw-rw---- 1 jg dp 18648 Aug 22 10:06 nx081508.txt -rw-rw---- 1 jg dp 22422 Aug 22 10:06... (1 Reply)
Discussion started by: joeyg
1 Replies

6. Shell Programming and Scripting

give permission to read a file

I want to give tester only the account tester to view the file /var/mail/root nobody else but him and of course the owner root w/o changing the permisions of /var/mail/root -rw-------. $ cat /var/mail/root cat: /var/mail/root: Permission denied (3 Replies)
Discussion started by: kenshinhimura
3 Replies

7. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

8. Solaris

add a ftp user with read and write permissions on a directory

hi all how I can create an ftp user in solaris 10 and have read and write permission on a directory. Thanks. (1 Reply)
Discussion started by: luisfja
1 Replies

9. Shell Programming and Scripting

File Read and Write

I have got a file in following format: AAAAAAA BBBBBBBB CCCCCCC DDDDDDD I am trying to read this file and out put it in following format: AAAAAAA,BBBBBBB,CCCCCCC,DDDDDD Preferred method is shell or Perl. Any help appreciated. (11 Replies)
Discussion started by: Araoki
11 Replies

10. Shell Programming and Scripting

Script to give a user sudo permissions

Can some one please let me know a script which gives the user sudo permissions? Thanks in advance.... (6 Replies)
Discussion started by: Revanth547
6 Replies
NFS4_SETFACL(1) 					    NFSv4 Access Control Lists						   NFS4_SETFACL(1)

NAME
nfs4_setfacl, nfs4_editfacl - manipulate NFSv4 file/directory access control lists SYNOPSIS
nfs4_setfacl [OPTIONS] COMMAND file... nfs4_editfacl [OPTIONS] file... DESCRIPTION
nfs4_setfacl manipulates the NFSv4 Access Control List (ACL) of one or more files (or directories), provided they are on a mounted NFSv4 filesystem which supports ACLs. nfs4_editfacl is equivalent to nfs4_setfacl -e. Refer to the nfs4_acl(5) manpage for information about NFSv4 ACL terminology and syntax. COMMANDS -a acl_spec [index] add the ACEs from acl_spec to file's ACL. ACEs are inserted starting at the indexth position (DEFAULT: 1) of file's ACL. -A acl_file [index] add the ACEs from the acl_spec in acl_file to file's ACL. ACEs are inserted starting at the indexth position (DEFAULT: 1) of file's ACL. -x acl_spec | index delete ACEs matched from acl_spec - or delete the indexth ACE - from file's ACL. Note that the ordering of the ACEs in acl_spec does not matter. -X acl_file delete ACEs matched from the acl_spec in acl_file from file's ACL. Note that the ordering of the ACEs in the acl_spec does not mat- ter. -s acl_spec set file's ACL to acl_spec. -S acl_file set file's ACL to the acl_spec in acl_file. -e, --edit edit file's ACL in the editor defined in the EDITOR environment variable (DEFAULT: vi(1)) and set the resulting ACL upon a clean exit, assuming changes made in the editor were saved. Note that if multiple files are specified, the editor will be serially invoked once per file. -m from_ace to_ace modify file's ACL in-place by replacing from_ace with to_ace. -?, -h, --help display help text and exit. --version display this program's version and exit. NOTE: if '-' is given as the acl_file with the -A/-X/-S flags, the acl_spec will be read from stdin. OPTIONS -R, --recursive recursively apply to a directory's files and subdirectories. Similar to setfacl(1), the default behavior is to follow symlinks given on the command line and to skip symlinks encountered while recursing through directories. -L, --logical in conjunction with -R/--recursive, a logical walk follows all symbolic links. -P, --physical in conjunction with -R/--recursive, a physical walk skips all symbolic links. --test display results of COMMAND, but do not save changes. PERMISSIONS ALIASES
With nfs4_setfacl, one can use simple abbreviations ("aliases") to express generic "read" (R), generic "write" (W), and generic "execute" (X) permissions, familiar from the POSIX mode bits used by, e.g., chmod(1). To use these aliases, one can put them in the permissions field of an NFSv4 ACE and nfs4_setfacl will convert them: an R is expanded to rntcy, a W is expanded to watTNcCy (with D added to directory ACEs), and an X is expanded to xtcy. Please refer to the nfs4_acl(5) manpage for information on specific NFSv4 ACE permissions. For example, if one wanted to grant generic "read" and "write" access on a file, the NFSv4 permissions field would normally contain some- thing like rwatTnNcCy. Instead, one might use aliases to accomplish the same goal with RW. The two permissions not included in any of the aliases are d (delete) and o (write-owner). However, they can still be used: e.g., a per- missions field consisting of Wdo expresses generic "write" access as well as the ability to delete and change ownership. EXAMPLES
Assume that the file `foo' has the following NFSv4 ACL for the following examples: A::OWNER@:rwatTnNcCy D::OWNER@:x A:g:GROUP@:rtncy D:g:GROUP@:waxTC A::EVERYONE@:rtncy D::EVERYONE@:waxTC - add ACE granting `alice@nfsdomain.org' generic "read" and "execute" access (defaults to prepending ACE to ACL): $ nfs4_setfacl -a A::alice@nfsdomain.org:rxtncy foo - add the same ACE as above, but using aliases: $ nfs4_setfacl -a A::alice@nfsdomain.org:RX foo - edit existing ACL in a text editor and set modified ACL on clean save/exit: $ nfs4_setfacl -e foo - set ACL (overwrites original) to contents of a spec_file named `newacl.txt': $ nfs4_setfacl -S newacl.txt foo - recursively set the ACLs of all files and subdirectories in the current directory, skipping all symlinks encountered, to the ACL con- tained in the spec_file named `newacl.txt': $ nfs4_setfacl -R -P -S newacl.txt * - delete the first ACE, but only print the resulting ACL (does not save changes): $ nfs4_setfacl --test -x 1 foo - delete the last two ACEs above: $ nfs4_setfacl -x "A::EVERYONE@rtncy, D::EVERYONE@:waxTC" foo - modify (in-place) the second ACE above: $ nfs4_setfacl -m D::OWNER@:x D::OWNER@:xo foo - set ACLs of `bar' and `frobaz' to ACL of `foo': $ nfs4_getfacl foo | nfs4_setfacl -S - bar frobaz AUTHORS
nfs4_setfacl was written by people at CITI, the Center for Information Technology Integration (http://www.citi.umich.edu). This manpage was written by David Richter. CONTACT
Please send bug reports, feature requests, and comments to <nfsv4@linux-nfs.org>. SEE ALSO
nfs4_getfacl(1), nfs4_acl(5), RFC3530 (NFSv4.0), NFSv4.1 Minor Version Draft. Linux version 0.3.3, August 2008 NFS4_SETFACL(1)
All times are GMT -4. The time now is 11:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy