Enable PWD command on anonymous FTP?


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
Error Enable PWD command on anonymous FTP?

Hello everyone - First post here,

I'm trying to connect to an anonymous ftp server and I am told by the server admin that I cannot have access to the "print working directory" command. I need to have access to this command in order for my (and my clients) preferred ftp client to connect. (the client disconnects when it encounters the PWD error)

I secretly think that the server admin isn't going to help me out unless I give him specific instructions on how to do this without compromising security.

The bizarre thing is that I can connect to the anonymous root no problem because pwd works in there. . it's just when I change directory to the folder I am supposed to use that pwd doesn't work there. What I don't understand is how the ls command could work and pwd not work. . I don't see how that has anything to do with security.

Can anyone help me find a work around to tell the sysadmin? Any thoughts would be awesome!!


Thanks in advance,

Tony

P.S. I did have one idea but I don't know exactly how to implement it. . . If pwd can't work because people in the anonymous user group can't get read access, could I write a small "hello world" program, call it PWD and put it in the path where PWD usually is? That way, it wouldn't have to actually read the current directory, it could just output some text like "PWD is Disabled!" I think that might spoof the ftp clients into thinking that PWD is working.
# 2  
People will need to know about FTP server, and client used in this scenario. Who are vendor/provider of those? If possible then you can tell us IP address of FTP server so that we ourself can know about FTP server.
Your idea about writing a binary and uploading it to server might not work if
1> You cannot set its executable permission
2> You don't have "write" permission in "bin"
3> You donot have exec permission there
# 3  
More Information

Hello and thanks for the reply.

The server is running some sort of Sun flavor of Unix. (best I can tell). The ftp clients I have tried have been the built in FTP in Dreamweaver 2004 MX and FileZilla. Both connect to the server ok, then when they try to print the current directory (pwd) the get a 550 error message and after seeing the error message, they both disconnect before I can actually do anything on the server.

CuteFTP and Dreamweaver 4 connect fine. I discovered that Dreamweaver 4 still performs the pwd command, but when it encounters the error, it ignores it rather than disconnect.

I have also used the DOS command line ftp client. I can connect ok using that and when I try to use pwd I cannot.

Here's the directory structure. I can connect to / and /foo_1/ with no problem and pwd works in those directories. The folder I need to connect to is /foo_1/foo_2/foo_3/

when I change directory into foo_1 and foo_2 I do not have access to use any command, not even ls. And when I get to the folder I need, foo_3, I can use nearly all ftp commands but pwd. PWD kicks up the 550 error.

Unfortunately, I cannot give you guys the FTP info.

What I do have is the ear of an unsympathetic IT guy who DOES have permission to copy files around, change permissions, etc.

When I asked him to let me use PWD, he said that he would have to give my group readable permission and that would break security. I do connect anonymously.

So this guy is not willing to find a work around which is why I'm here.

I either need:

A) The proper way to get pwd to work without compromising security, without making my group readable.

B) What I need to do to get my binary in the right place to "act" like the pwd command. . A simply "hello world" binary should be able to run without read access.

C) Any other solution, hopefully on the server side - while I could use a different FTP client, we have customers who we transfer files to on this box, and we don't want to have to give them esoteric directions to get their favorite ftp client to work.

Also, I did find a thread in devshed forums written by one of the admins in this forum, Perderabo, where he said that "pwd can't work in it's pure form if there are folders between the root folder and the target folder" I think that's the bottom issue - I know there has to be a proper work around on the server side. It seems to me like the IT guy who runs the server doesn't mean to disable PWD, it's just that it's a side effect of security.

Ok, done rambling - let me know if you all need more information!

Thanks again!
# 4  
If you cd to a bad or unavailable directory, ftp generates an error.
Older versions of ftp clients don't need to "show pwd" when they connect.

So, I must be getting too old, but I fail see why you can't use a version that does not care about pwd, unless you are trying to get files whose names and locations you don't know. Your code should not care about pwd.

And, if the system in question is an IT sox box, why don't you run rsync under ssh? If the box is the mastewr, there is no violation. You connect, rsync moves/updates all of the files/directories. You don't need to know anything on your side.
# 5  
The folder that I need to connect directly to is not a "bad" directory. I can see the contents of the folder, I have permission to put and receive files. The only issue is that PWD doesn't work. The two parent folders I cannot see the contents of though I can change directories to the folder I need to see.

Also, it's easy for me to use a different FTP client, but there are many people in my department who are not tech savvy and MUST use their preferred ftp client. Also, we have customers who need to connect to download files. It's bad form to say "Hey, you can't use the software you have - use something different."

Thanks for the response though!
# 6  
Well, they "have" the software, unless you're using an embedded ftp.

Why don't you simply get the files for them, store them on a public network drive and win hundreds of new friends...?

cron ftp every couple of minutes - or ssh rsync ecery 10 minutes or whatever.
# 7  
While these suggestions are helpful, they don't answer my question specifically.

The FTP clients that we and our customers use crap out when they encounter a PWD 550 error message. What ways are there to avoid that error without changing the FTP client or the general process? In other words, is it possible to allow PWD for anonymous connections without compromising security? Like writing a binary and replacing PWD with the binary? Or any other ideas like that?

I know that there are many, many other solutions that would work, but this is a problem that I am limited to solve in a particular way. The server isn't directly in my control. If it was, I'd throw away the anonymous FTP crap and move to SFTP with a user:pass for each individual user and tie the registration to a web app front end to help manage everything (or something like that).

I know that the solution I am seeking isn't the best or elegant, but I believe it's the only one that will work in this situation now.

Thanks!
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #288
Difficulty: Easy
In Linux, Logical Volume Manager (LVM) is a device mapper target that provides sound card I/O management for the Linux kernel.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Anonymous ftp log?

Hello, I was wanting to know if there is any log/tracker for anonymous ftp activity for users that are logging in to our server. We migrated over to a new server and cleaning up some loose ends on the old server. We noticed that some files are being loaded on the old server via anonymous ftp.... (1 Reply)
Discussion started by: shorty
1 Replies

2. HP-UX

Enable ftp port

Hi Experts, Need your help in enabling the ftp port in HP-UX box. Is there any command/config file that needs to be changed? Also is it possible to open it only for few selected IPs only? (9 Replies)
Discussion started by: sai_2507
9 Replies

3. Solaris

How to change pwd during logging on ftp server?

Dear All, Could I change password while login in to ftp server(solaris 10)? I tried to use fileZilla and command prompt(window) to change my password but It can't. Do you have any suggestion ? Ps. I can't telnet and ssh to the server because of poicy for ftpuser. Thank in advance (3 Replies)
Discussion started by: unitipon
3 Replies

4. UNIX for Dummies Questions & Answers

How to block an anonymous ftp user?

Could anyone provide information on how to block a specific client machine from being able to log onto anonymous ftp? (10 Replies)
Discussion started by: dennisheazle
10 Replies

5. Cybersecurity

anonymous ftp attack?

For the last week or so every day for about 6 to 10 hours someone is logging in and out continuously to our anonymous ftp. They don't stay logged in. It seems like it must be an automatic process aimed at tying up our anonymous ftp. The ID of the server doing this is can59-4-82-240-1. As a result... (2 Replies)
Discussion started by: dennisheazle
2 Replies

6. IP Networking

ftp dir and pwd commands

Hi, I have a conenction to remote server that I'm sending files too via FTP. The problem I have is that when the file gets delivered it is 0 (zero) size. I've manually connected and logged on. The only command I can successfully execute is pwd. When I do a dir or a put command it will... (7 Replies)
Discussion started by: nhatch
7 Replies

7. Linux

ftp telnet enable

hi , i have jsut installed linux 9.0 , but i can not ftp or telnet to the system . i have installed the ftp and the telnet server during installation . i have also configured the files to enable the ftp and telnet , the ftp and the telnet daemons are running , but when i do ftp : ftp... (1 Reply)
Discussion started by: ppass
1 Replies

8. UNIX for Dummies Questions & Answers

Enable FTP on SCO

My goal is to use FTP to transfer file between PC and SCO Unix server.When I try to connect via FTP with root user, it failed. What should I do? How to configure ftpaccess? Thanks in advance! (2 Replies)
Discussion started by: Vladan
2 Replies

9. UNIX for Dummies Questions & Answers

Disable anonymous ftp????

How do i disable anonymous ftp on a unix system?????? Please help!!!!!!!1 (2 Replies)
Discussion started by: rrivas
2 Replies

10. UNIX for Dummies Questions & Answers

Anonymous FTP Server

How do I set up and Anonymous FTP Server on Unix FreeBSD v4.3? Also, how do I set up my account to get root access when I am logged onto my server through ftp? Thanx in advanced. (6 Replies)
Discussion started by: ByondF1
6 Replies

Featured Tech Videos