open a file over ftp without locking it

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
Homesick
Forum Newbie
Posts: 16
Joined: Tue Apr 06, 2010 1:53 am

open a file over ftp without locking it

Post by Homesick »

Dear All,

How could I open a file over ftp and read it without locking it to allow other programs from accessing it for reading or writing or even renaming the file,,

Thanks
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: open a file over ftp without locking it

Post by Jade »

You need to check with whatever operating system you're using. I think you can turn this off in some versions of Linux but I'm not 100% certain.

Either way I wouldn't recommend it. Think about this scenario. Person X is downloading a file and at the same time Person Y changes the file name. Now Person X has a corrupted file because the file they were downloading no longer exists.
Homesick
Forum Newbie
Posts: 16
Joined: Tue Apr 06, 2010 1:53 am

Re: open a file over ftp without locking it

Post by Homesick »

Thanks Jade for your response,

If you don't recommend checking OS, how could I deal with such scenario,, I wanna allow all processes from reading, writing or renaming some file while a php program reading it
Post Reply