Solved

Linux user/group for shell and ftponly

Posted on 2004-08-08
3
497 Views
Last Modified: 2012-08-14
Hi,

user ABC can ssh login and ftp to the server, /home/ABC

user XYZ only can ftp, ftpchroot to /home/ABC/www/*

the problem are:

there might have some html is www created by ABC, but  XYZ might modify/overwrite the html via ftponly,

hows the file ownership & group looks like which able to allow
ABC to access/modified/create the html as well as
XYZ to access/modified/create html in www directory
0
Comment
Question by:qazakax
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Mysidia
ID: 11748824
You want /home/ABC/www  to be writable by both, but not allow XYZ to modify/overwrite files created by ABC?

Then use the sticky bit

chown abc.ftponly /home/ABC/www
chmod 1771 /home/ABC/www
or chmod +t /home/ABC/www

(That would be a similar stuation as with /tmp... only the file's creator should be able to update the files)

for ABC to access/modify/create content, make him the owner
for ftponly to be able to write to www make that the group and set group write.

In short
drwxrwx--t        ABC  ftponly          ...           www/


0
 

Author Comment

by:qazakax
ID: 11755011
Hi,

basically i wan /home/ABC/www can be writable by both, n also allow either ABC or XYZ can modify/overwrite the files.

then in /etc/group should be like this ??
ABC:x:500:ABC,XYZ

0
 
LVL 23

Accepted Solution

by:
Mysidia earned 25 total points
ID: 11758407
In that case, yes, put both users in the same group.

And have the directory owned by the group

and make the mode for /home/abc/www

chown user.group /home/abc/www
chmod 2771 /home/abc/www

(setguid  for a directory means new files will be owned by the same group by default)
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Scripted configuration of TightVNC with Start on boot 7 51
Determine Who is Runnig my Bash Shell Script 4 62
linux installs 6 49
nagios 4 php error after installation 6 76
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now