# Pure-ftpd : read-only folder

## scoob

Ok I've searched in the forums btu didn't find anything.

I am using samba to share files in my Private lan... everything is working fine.

I installed and started to configure pure-ftpd... the problem is that i didn't find a way to give full access to my samba but to give only read access to my pureftpd ... the only thing i managed to do is to give read-only to both or full control to both...

I am not a super noob but not an expert either... anyone can help me to setup my pure-ftpd with one folder write only(incomming) and all the rest read-only but keep my samba share full control?

----------

## aman

Can't you just chmod a-w the folder?

----------

## Kraymer

 *scoob wrote:*   

>  anyone can help me to setup my pure-ftpd with one folder write only(incomming) and all the rest read-only but keep my samba share full control?

 

More information about the user that logs in to your server would be useful. I suggest to create a virtual user (look at their homepage for details). Myself, I've created a user (on my system) called 'ftpuser' in group 'ftpuser'. Doing this, you can create virtual users that have all permissions that 'ftpuser' has on your system. While ftpuser not being in your group 'users' or having your username account, it won't be able to delete files not belonging to ftpuser/ftpuser. Then, just create an incoming directory, make it 755 for ftpuser/ftpuser and you're done.

If you want read/write-access to all of your stuff (not only incoming), just map the login-user to your system account.

Also, you could take a look at the man page, especially following options:

 *Quote:*   

> -K     Allow  users  to resume and upload files, but NOT to delete them. Directories can be removed, but only if they are empty.
> 
> and
> 
> -G     When this option is enabled, people can no more change the name of already  uploaded  files,  even  if they own those files or their directory.

 

If you have further questions, just ask.

Good luck

Sebastian

----------

## guldan

 *Kraymer wrote:*   

> 
> 
>  *Quote:*   -K     Allow  users  to resume and upload files, but NOT to delete them. Directories can be removed, but only if they are empty.
> 
> and
> ...

 

I have one further question exactly concerning this.

I use virtual users and need the resuming option 

=> I have to enable the "-K" ?

However this blocks my user from beeing able to delete files ? Isn't there a way to have resuming enabled and still be able to delete files (I miss that HARDLY) ?

----------

## Kraymer

Hm, I didn't re-read the documentaion before this post, but I guess renaming should be possible even without -K.

The thing is, if people aren't abe to rename files at all, resume won't work. That's where -K comes in and enables resuming while disalbing a common rename/delete operation.

It's a guess in the half-dark, but it'll only cost you a simple config edit and a restart to find out  :Wink: 

----------

## guldan

 *Kraymer wrote:*   

> Hm, I didn't re-read the documentaion before this post, but I guess renaming should be possible even without -K.

 

But I need -K since without this option the server does not support resuming (As I understand it from the docu)

 *Quote:*   

> The thing is, if people aren't abe to rename files at all, resume won't work. That's where -K comes in and enables resuming while disalbing a common rename/delete operation.
> 
> It's a guess in the half-dark, but it'll only cost you a simple config edit and a restart to find out 

 

So there is def. no chance to have resuming and the ability to deleted files at the same time ? That sounds hard to belive ? Why should those two block each other ?

----------

## Kraymer

 *guldan wrote:*   

> So there is def. no chance to have resuming and the ability to deleted files at the same time ? That sounds hard to belive ? Why should those two block each other ?

 

Okay, I browsed through the online docu (README), the description for -K is not that specific regarding resume. resuming isn't mentioned elsewhere..

I think it must be possible to let users resume and delete files at the same time, too. That's why I proposed to try it without -K in the first place.

At this point, I gues you have no other choice than to try it..

If that it still seems impossible, try the mailing list. Either there is a solution or we just found a good reason for submitting a feature request  :Wink: 

Sebastian

----------

