473,463 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Create a very limited user (access to one folder only)

dlite922
1,584 Expert 1GB
I'm creating a batch file to be run on scheduled task on windows that sftp's a file using winscp to a linux machine.

The password is saved in this bat file for all to see, so i need to create a user on the Linux machine that can't do anything but have write access to 1 folder.

I don't want you to walk me through it from A to Z, but after I created the user, how do I do things like:

- cannot log into server using command line (SSH), if possible.
- make sure only one folder is allowed to access via sftp, and nothing else, not even home directory. can I eliminate home directory?


I might consider the home directory "be" the one folder that they have access to, if that's easier.

Also any pointers on how I can only allow txt file to be sent, no exe, pl, etc extensions allowed?

thanks guys,







Dan
Aug 22 '08 #1
2 5951
mrmr
1
The standard way to confine sessions is through the 'chroot' call.
google for 'chroot jail sftp' and you'll find lots of step by step guides.

The 'extension' of a file has no meaning on the linux box and is just part of the name, I'm not aware of a simple mechanism to outlaw certain names.
Aug 24 '08 #2
Laharl
849 Expert 512MB
You could probably do it through a combination of chmod and regular expressions, though. Were I to guess, a shell script would be required to effeciently do this, probably one that runs every so often to ensure that new files are also chmod'd properly.
Aug 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: fripper | last post by:
When testing a VB .Net application on my system (with IIS installed) I get an error message when using the fileopen function and the file does not exist ... i.e. I want fileopen to create the file....
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
6
by: Frank Wilson | last post by:
Tom, It sounds to me like ASP, not ASP.NET is handling the request for WebForm1.aspx. This is most likely an IIS config issue that may have been caused by order of installation or...
0
by: Mr. Land | last post by:
Hello. I'm having trouble creating a new Web project using VS .NET 2003 on the local default web. I've done a lot of research about this and found a lot of suggestions, but none of them seem to...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
2
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
10
by: kai | last post by:
Hi, All I am trying to create a file folder for any login user, and create sub folders for the user on a web page. After the user login again, he can only sees his own folder on the Web page. I am...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.