nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Strange ftp requirement to give only write access

This is a discussion on Strange ftp requirement to give only write access within the File Servers forums, part of the Mastering Servers category; Hi all, We have the following requirement.. we have a ftp account in the server which is shared by different ...


Go Back   nixCraft Linux Forum > Mastering Servers > File Servers

Linux answers from nixCraft.


File Servers Discussion about Samba, NFS and other UNIX / Linux file servers.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-02-2010, 11:46 AM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 441
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default Strange ftp requirement to give only write access

Hi all,

We have the following requirement..

we have a ftp account in the server which is shared by different clients, the requirement is what ever files uploaded by any client, should not viewed by other clients. I given only write permission to this account.. but still not able to achieve the hiding of data..

is there any other way to achieve this?
i don't want to create different client accounts..
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
  #2 (permalink)  
Old 02-02-2010, 01:30 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,707
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

chroot each account. Are you using vsftpd? If so just search cyberciti.biz for vsftpd chroot.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 02-02-2010, 03:17 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 441
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

We have chroot facility.. but problem is that we have to share same client account details(this is the requirement by one project) with different clients..

here clients will be varying all the time.. so they don't want to create individual client accounts and applying ch-rooting to that particular folder..

any inputs.. i here that its possible.. to hide/deny listing of folders in server..
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
  #4 (permalink)  
Old 02-02-2010, 04:12 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 441
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

For those who did not understand my previous requirement

I want to have an ftp user that is very restricted. I want user to be able to write only is shared with so many users. . We do not want them to be able to see any of the files in the upload directory, or download any files. Basically, i want to jail them into an unreadable directory so all they can do is upload. We do not want anonymous access. Please help.
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
  #5 (permalink)  
Old 03-02-2010, 10:50 AM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 441
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

I visited many links on write-only access every one saying its possible.. but i don't know where i am doing mistake.. i am following the same steps what they mention but not able to achieve what i am looking for..
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
  #6 (permalink)  
Old 03-02-2010, 03:43 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,707
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Can you paste your config file?
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #7 (permalink)  
Old 04-02-2010, 10:39 PM
amitabh's Avatar
Contributors
User
 
Join Date: Jul 2008
Location: New Delhi
OS: FreeBSD
Posts: 99
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Power: 4
amitabh has a spectacular aura about amitabh has a spectacular aura about amitabh has a spectacular aura about
Send a message via MSN to amitabh Send a message via Yahoo to amitabh Send a message via Skype™ to amitabh
Default

Another way of achieving this would be to use a script after each upload. Pure-FTPd supports this feature.
Pure-FTPd and the Upload-Script Feature

If you are using vsftpd, try setting the dirlist_enable variable to NO in the vstpd.conf file. I have not tried it our, but the doc (Manpage of VSFTPD.CONF) says it should deny all directory listing commands.
Reply With Quote
  #8 (permalink)  
Old 11-03-2010, 03:13 PM
Junior Member
User
 
Join Date: Sep 2009
OS: Red Hat,Fedora
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
arvnix is on a distinguished road
Default

Below settings achieved Write only Access to FTP Server.

Once Data get upload user unable to see it.


Testing on Test FTP Server

/usr/sbin/useradd -c "testing Write Only Account" -d /home/UserA/ -m -s /bin/sftpsh UserA

/usr/sbin/useradd -c "testing Write Only Account" -d /home/UserA/UserB/ -m -s /bin/sftpsh UserB

/usr/sbin/useradd -c "testing Write Only Account" -d /home/UserA/UserC/ -m -s /bin/sftpsh UserC

/usr/sbin/useradd -c "testing Write Only Account" -d /home/UserA/ -m -s /bin/sftpsh UserD

[root@test-pc1 root]# passwd UserB

[root@test-pc1 root]# passwd UserA

[root@test-pc1 root]# passwd UserD

[root@test-pc1 root]# passwd UserC


[root@test-pc1 root]# tail -4 /etc/passwd
UserA:x:533:533:testing Write Only Account:/home/UserA/./:/bin/sftpsh
UserB:x:534:534:testing Write Only Account:/home/UserA/UserB/./:/bin/sftpsh
UserA_client:x:535:535:testing Write Only Account:/home/UserA/UserC/./:/bin/sftpsh
UserD:x:536:536:testing Write Only Account:/home/UserA/./:/bin/sftpsh
[root@test-pc1 root]#

Add users to Group "UserA"

[root@test-pc1 root]# tail -4 /etc/group
UserA:x:533:UserD,UserB,UserC
UserB:x:534:
UserC:x:535:
UserD:x:536:

Apply SGID(2) & permissions (770) to Parent Folder

[root@test-pc1 home]# ls -ld /home/UserA/
drwxrws--- 6 UserA UserA 4096 Mar 11 16:54 /home/UserA/

Apply SGID(2) & permissions (370) to Parent Folder and ownership as shown below

[root@test-pc1 home]# ls -l /home/UserA/
total 8
d-wxrws--- 4 UserB UserA 4096 Mar 11 19:46 UserB
d-wxrws--- 4 UserC UserA 4096 Mar 11 19:42 UserC

Observation of Handling / Accessing SFTP Accounts :
1) Client should use WinSCP for login to FTP2 Server and for coping data
2) Client Accounts("UserB" & "UserC") may get below shown error while they login and while coping data so please ignore this errors.
Reply With Quote
The Following User Says Thank You to arvnix For This Useful Post:
kumarat9pm (11-03-2010)
  #9 (permalink)  
Old 11-03-2010, 08:19 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 441
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

This is what exactly what i am looking.. this solves the problem..
__________________
Thanks,
Surendra Kumar Anne
Ubuntu: Simple, Stylish and Striking..!
Linux: Fast, friendly, flexible and .... free!
Support Open source.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Hardware requirement for a Linux based Apache web server arvnix CentOS / RHEL / Fedora 4 14-01-2010 02:21 PM
strange task noctemIV CentOS / RHEL / Fedora 1 02-12-2009 08:42 AM
Stop Script If You Forgot To Give A Parameter Or Variable rockdalinux Getting started tutorials 2 04-09-2009 07:07 PM
Strange Problem Roshu Networking, Firewalls and Security 0 13-09-2007 08:26 PM
Debian recovery mode read only access make it write access Donavit Linux software 1 30-12-2005 12:49 AM


All times are GMT +5.5. The time now is 10:45 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38