Operating System - Tru64 Unix
1827808 Members
2048 Online
109969 Solutions
New Discussion

Re: Want to block delete from ftp

 
Kapil Jha
Honored Contributor

Want to block delete from ftp

Hi All
I want to block the mdelete command while performing ftp.So as to save my files from illegal deletion.
Please help me.....
Thanks
Kapil
I am in this small bowl, I wane see the real world......
10 REPLIES 10
Steven Schweda
Honored Contributor

Re: Want to block delete from ftp

FTP as a normal user or anonymous FTP?

Who owns the files? ("ls -l".)

Some people use file permissions to do this
kind of thing: "man chmod".
Kapil Jha
Honored Contributor

Re: Want to block delete from ftp

Hi Stevan
Thanks for reply actually problem is that i can not change file permission.I am using a restricted shell for this user and when i am doing ftp from this user,i am able to delete files which i can not afford to.
Please suggest something.
Thanks
I am in this small bowl, I wane see the real world......
Steven Schweda
Honored Contributor

Re: Want to block delete from ftp

It's not clear to me exactly what you want to
be able to do, and what you want _not_ to be
able to do.

> [...] i can not change file permission [...]

Why not?
Kapil Jha
Honored Contributor

Re: Want to block delete from ftp

Hi
I tell u in detail,there are some files which has some permission say 770 ,now a 3rd party is pulling these files by ftp with the same user trough which these files are generated.
Now this 3rd party can do whatever they want do with these files,they can delete,modify etc.
So for manipulation by directly login to system is made restricted by creating a new user having restricted shell so this problem is solved by still 3rd party can delete files using mdelete from ftp prompt.
And I want to restrict this deletion.
Thanks for helping me.
Kapil
I am in this small bowl, I wane see the real world......
Steven Schweda
Honored Contributor

Re: Want to block delete from ftp

The easy answer is probably to have
permissions like 750 on the files, and then
have a different user (with the right group)
do the FTP operations.

Of course, the file ownership must make
sense, too. The file owner (or the owner of
the file's directory) can do whatever he
wants. Anyone in the right group can
read/execute the file, whether he's a local
shell user or a remote FTP user.

I haven't used ACLs on Tru64, but I'd bet
that you can do more exotic things with them,
if you wish.

Of course, if you insist that "i can not
change file permission", then the problem
becomes more difficult.
Kapil Jha
Honored Contributor

Re: Want to block delete from ftp

Thanks stevan
But is there anything trough which i could avoid the command mdelete completely from FTP.
There must be something....
anyways Thanks a lot
I am in this small bowl, I wane see the real world......
Steven Schweda
Honored Contributor

Re: Want to block delete from ftp

Write your own FTP server? Get a different
(existing) FTP server? (Is wu-ftp still
popular?)

"man ftpd"? You might find something helpful.

Why only "mdelete"? What about "delete"?
And "rename"?

Why don't you like the easy solution?
Kapil Jha
Honored Contributor

Re: Want to block delete from ftp

Its not like that i don not want easy solution
I just thought if there is some simple way to avoid all these commands.
Thanks a lot
I am in this small bowl, I wane see the real world......
Steven Schweda
Honored Contributor

Re: Want to block delete from ftp

There's a simple way to stop bad things from
happening, but not a simple way to stop a
user from asking for bad things to happen.

Also, when the user says "delete" (or
"mdelete"), the user's FTP client program
actually sends a "DELE" command (or many
"DELE" commands) to the FTP server. The
user's "rename" becomes a pair of "RNFR" and
"RNTO" commands. If you wish to stop the FTP
server from doing something, you may need to
know what it's doing now.

For a good time, FTP into your server and say
"quote help". The FTP server should reply
with a list of the commands which it
understands.

For even more fun, if your ftp client program
supports it, say "debug", and then do some
normal things. This should show you the
actual FTP commands and responses which go
between the client and server.

None of this will directly help you with your
problem, but it may be educational.
Kapil Jha
Honored Contributor

Re: Want to block delete from ftp

Its been long time closing this thread
I am in this small bowl, I wane see the real world......