[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Linux user/group for shell and ftponly

Posted on 2004-08-08
3
Medium Priority
?
511 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 75 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

650 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