Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Linux sftp — how to add new user to access exist directory with write permission? Post 303038382 by uwo-g-xw on Sunday 1st of September 2019 09:47:14 AM
Old 09-01-2019
Linux sftp — how to add new user to access exist directory with write permission?

I have built a website and I can access and edit the website'files on server via the root user. The current file and directory structures are not changeable. Now I am hiring a webpage designer to help me re-design some pages, I am going to let the designer edit the files directly on the server. So I need to add a new user and restrict the new user to access only three front-end related directory. And the three directories are not in the same directory, like below:

Code:
/home/www/application/index/view (html files)

/home/www/public/js (js files)

/home/www/public/css (css files)

The first step adding new user has been accomplished. But the problems are:

1 how to let the new user access above directories with write permission?

2 how to bind above three directories to the new user? (It seems ChrootDirectory can only bind one directory.)

Any suggestions will be appreciated. Thanks!
 

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
pure-quotacheck(8)						     Pure-FTPd							pure-quotacheck(8)

NAME
pure-quotacheck - Update virtual quota files for Pure-FTPd SYNTAX
pure-quotacheck -u username/gid -d home directory [-g group/gid] DESCRIPTION
pure-quotacheck create a .ftpquota file in the specified directory. This file contains the current file and size of the directory, and it is used by Pure-FTPd when virtual quotas are enabled. It's recommended to periodically run pure-quotacheck for every user, in crontabs. OPTIONS
-d <directory> Scans the specified <directory>. -g <group or gid> Sets the group files will be scanned as. This is optional : if a user name is passed to -u</fR>, group are automatically retrieved. -u <user or uid> Set the user name files will be scanned as. This is mandatory, and it can't be "root". -h Output usage information and exit. FILES
.ftpquota EXAMPLES
To run this program the standard way type: pure-quotacheck -u john -d /home/john AUTHORS
Frank DENIS <j at pureftpd dot org> SECURITY
pure-quotacheck switches real and effective uids/gids as soon as possible. Root privileges are never given back. pure-quotacheck refuses to scan directories with uid = 0 (root) or gid = 0 (wheel/root) . pure-quotacheck performs a chroot() call to the home directory. It never traverses parent directories. pure-quotacheck only scans real files (no socket, no pipe, etc) . pure-quotacheck enforces read access on directories to prevent against people doing chmod 0 before a quota scan. pure-quotacheck enforces write access on the home directory to properly write the .ftpquota file. pure-quotacheck never scans the same inode/device pair twice. SEE ALSO
ftp(1), pure-ftpd(8) pure-ftpwho(8) pure-mrtginfo(8) pure-uploadscript(8) pure-statsdecode(8) pure-pw(8) pure-quotacheck(8) pure-authd(8) RFC 959, RFC 2228, RFC 2389 and RFC 2428. Pure-FTPd team 1.0.36 pure-quotacheck(8)
All times are GMT -4. The time now is 12:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy