Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP user inside another user.

Status
Not open for further replies.

dzvonyo

Technical User
Aug 4, 2008
6
NZ
FTP user inside another user.

what i am trying to achieve is as follows.

I have set-up a website the directory for is on /var/
What I need to set now is to have a friend upload(FTP) her photos to my site
but HAVE this friend only access one page where her photos are.

where do i created the directory for her so that she can be able to upload(FTP) her photos,
without changing anything on website.

I tried this
/var/mkdir friend
but didn't work.

Thanks
 
You can change the group that owns the directory where you want the files uploaded. Then make anyone you want to be able to access that directory a member of that group. You will also need to make sure that "group" has write permission in that directory.

 
What will be the command, thats where i am stuck.
 
Ok, first create a group called friend:

groupadd friend

Now you need to add your friend to the friend group. Let's say her user name is sally:

usermod -Gfriend sally

So far so good. Next, create the directory you want this group to use. For example /var/
mkdir /var/ (you must be root or the owner of this dir)

Now let's say that /var/ ownership is user dzvonyo and group dzvonyo but we want /var/ to be owned by the user dzvonyo and group friend:

chown -R dzonyo:friend /var/
 
Ooops! got in too much of a hurry do bug out. I forgot to change the permissions. By default most of the directories will be set to 755. That means the owner can read, write and execute stuff in that directory but the group and world can only read and execute. So change this to 765 or 775:

chmod 775 /var/
The files are usually set to 644 so you would change that to 664:

chmod 664 /var/
You can usually set your ftp server to automatically set these permissions anytime a file is created or uploaded.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top