building an FTP application

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

building an FTP application

Post by kendall »

hi,

I have another question about the above topic that i need some advice on

I am building an FTP application that will have different user level and user access.

for example if i have user A and user B and i have directory 1 with folders A and B

A can see folder A and files in directory 1 but can only download and view

whilst B can see directory 1 and Folder A and B but can only delete files located in B

Now the question here is what is my best approach.
Should i (because of the complexity of level of security create an additional FTP account for each user)

or create one additional account and use PHP to determine the level of access and permissions

it probably also depends on my server feature (UNIX) which i am looking into but to get 2nd opinions on what is generally done in the aspects of security levels and permissions

Kendall
User avatar
mr_griff
Forum Commoner
Posts: 64
Joined: Tue Sep 17, 2002 11:11 am
Location: Bozeman, Montana

Post by mr_griff »

Are you looking to setup an actual ftp server or simulate a web based one using php?
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

building FTP client

Post by kendall »

yes i am building and ftp client using PHP
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Building and FTP application

Post by kendall »

hi,

i was reading the php.net documentation on ftp_get()

But it was not clear on defining the acutal local and remote file syntax,

i used the function like ftp_get($serv,"C:\Windows\$file","$DOCUMENT_ROOT/$file",FTP_BINARY);

which download successfully but i dont see the file

so i ask the following questions?

was that the proper syntax to use?
how will it locate the file to get? would it be relative or absolute? (the php file is in a different folder to the file to download)

if there isnt a local file will it create one?

there is ASCII and BINARY in FTP i know but when you say use ASCII for text files do you literally mean ".txt" files or text files like word doucments excel sheets?

thus a PHP file would mean FTP_BINARY?

Kendall
Post Reply