Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Linux sftp — how to add new user to access exist directory with write permission? Post 303038452 by Corona688 on Tuesday 3rd of September 2019 11:59:16 AM
Old 09-03-2019
That depends on the owner and group of the folders. Ownership is often resolved by changing the users, rather than changing the files.

Code:
ls -l /path/to/folders/of/interest

a+w is not a good solution if you don't want to give every single person there is write access.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

2. Shell Programming and Scripting

write permission to a perticular user to a directory

Hi, The requirement is like, the program needs 2 argument one is user_id and second one is directory path. My script will check if that user_id has write access to the directory path. The directory path may be in any file system like AFS or NFS. Can any one please suggest some points to... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

3. UNIX for Advanced & Expert Users

about the access permission of users home directory

RHEL5.0 As we know, when root create a new user, a new home directory will be created : /home/user I want to know what determine the access permission of /home/user . Thanks! (1 Reply)
Discussion started by: cqlouis
1 Replies

4. 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

5. Shell Programming and Scripting

SFTP Does directory exist?

Hi, Im trying to add some validation into my shell script code that basically checks whether a directory exists before SFTP'ing a file to it. If the directory exists then it will add the file, if not then it should return some kind of message. This is the code I have written so far but with no... (1 Reply)
Discussion started by: Jack_Maloney
1 Replies

6. Shell Programming and Scripting

search any user files with write permission

Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter. any body can help me to explain what is that mean? thank's (1 Reply)
Discussion started by: michlix
1 Replies

7. Web Development

Apache write permission issues to another user owned directory

Hi I am trying to make a web program which is command line equivalent. i have done the coding in cgi program in perl and html for basic forms to take inputs. when i ran the program from web application i see permission denied messages. after analyzing i found apache is running as wwwrun which... (2 Replies)
Discussion started by: rakeshkumar
2 Replies

8. Red Hat

User permission access

Hi folks, I am trying to grant the access like below items using the setfacl command, but i couldn't achieve as what I required. any other possibility. username : testing Readonly access in /form_dl/system/prd/logs Write only access in /form_dl/system/prd/deploy No access to other... (0 Replies)
Discussion started by: gsiva
0 Replies

9. UNIX for Beginners Questions & Answers

Setting write permission for particular user

Hi All, We have a scenario in production where we want only one user from a group to modify the file. The file is not set to write permission for application manager. -r--r--r-- 1 amgr u00 15661716 Aug 30 00:06 DCI.dat So here amgr will have permission to edit the file. We want a... (10 Replies)
Discussion started by: arunkumar_mca
10 Replies

10. UNIX for Beginners Questions & Answers

Checking if the directory has read and write permission

logMsg='Started by '${USER} LOG_MESSAGE "${logMsg}" resultCode=$? if ]; then return ${resultCode} fi touch ${FILELISTPATH} resultCode=$? if ]; then logMsg='failed to create file list:'${FILELISTPATH} LOG_ERROR "${logMsg}" CUSTOM_PREPROCESS ${FATAL} ... (2 Replies)
Discussion started by: raka123
2 Replies
chown(2)							System Calls Manual							  chown(2)

NAME
chown(), fchown(), lchown() - change owner and group of a file SYNOPSIS
DESCRIPTION
The system call changes the user and group ownership of a file. path points to the path name of a file. sets the owner ID and group ID of the file to the numeric values contained in owner and group respectively. A value of or can be specified in owner or group to leave unchanged the file's owner ID or group ID, respectively. Note that owner and group should be less than (see limits(5)). The group ownership of a file can be changed to any group in the current process's access list or to the real or effective group ID of the current process. If privilege groups are supported and the user has the privilege, the file can be given to any group. If the path given to contains a symbolic link as the last element, this link is traversed and path name resolution continues. changes the owner and group of the symbolic link's target, rather than the owner and group of the link. The system call functions exactly like except that it operates on a file descriptor instead of a path name. fildes is a file descriptor. The system call sets the owner ID and group ID of the named file just as does, except in the case where the named file is a symbolic link. In this case, changes the owner and group of the symbolic link file itself. Access Control Lists - HFS File Systems Only A user can allow or deny specific individuals and groups access to a file by using the file's access control list (see acl(5)). When using in conjunction with HFS ACLs, if the new owner and/or group does not have an optional ACL entry corresponding to and/or in the file's access control list, the file's access permission bits remain unchanged. However, if the new owner and/or group is already designated by an optional ACL entry of and/or %.group, sets the file's permission bits (and the three basic ACL entries) to the permissions contained in that entry. Access Control Lists - JFS File Systems Only A user can allow or deny specific individuals and groups access to a file by using the file's access control list (see aclv(5)). When using in conjunction with JFS ACLs, if the new owner and/or group of a file have optional ACL entries corresponding to and/or in the file's access control list, those entries remain in the ACL but no longer have any effect, being superseded by the file's and/or entries. Security Restrictions Only processes with an effective user ID equal to the file owner or a user with the privilege can change the ownership of a file. If priv- ilege groups are supported, the owner of a file can change the ownership only as a member of a privilege group allowing as set up by the command (see setprivgrp(1M)). All users get the privilege by default. When a process changes the ownership or group of a file, the file system may clear the set-user-ID and set-group-ID bits. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
and return the following values: Successful completion. Failure. The owner and group of the file remain unchanged. is set to indicate the error. ERRORS
If or fails, is set to one of the following values: Search permission is denied on a component of the path prefix. path points outside the allocated address space of the process. The reliable detection of this error is implementation dependent. Too many symbolic links were encountered in translating path. A component of path exceeds bytes while is in effect, or path exceeds bytes. The file named by path does not exist. A component of the path prefix is not a directory. Either owner or group is greater than or equal to or is an illegal negative value. The effective user ID is not a user with privilege and one or more of the following conditions exist: o The effective user ID does not match the owner of the file. o When changing the owner of the file, the owner of the file is not a member of a privilege group allowing the priv- ilege. o When changing the group of the file, the owner of the file is not a member of a privilege group allowing the priv- ilege and the group number is not in the current process's access list. The named file resides on a read-only file system. If fails, is set to one of the following values: fildes is not a valid file descriptor. Either owner or group is greater than or equal to or is an illegal negative value. The effective user ID is not a user having privilege and one or more of the following conditions exist: o The effective user ID does not match the owner of the file. o When changing the owner of the file, the owner of the file is not a member of a privilege group allowing the priv- ilege. o When changing the group of the file, the owner of the file is not a member of a privilege group allowing the priv- ilege and the group number is not in the current process's access list. The named file resides on a read-only file system. AUTHOR
was developed by AT&T. was developed by the University of California, Berkeley. SEE ALSO
chown(1), setprivgrp(1M), chmod(2), setacl(2), acl(5), aclv(5), limits(5), privileges(5). STANDARDS CONFORMANCE
chown(2)
All times are GMT -4. The time now is 08:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy