/    Sign up×
Community /Pin to ProfileBookmark

Noob having trouble with file permissions, or so noob thinks.

What do I need to do to allow files and directories created by PHP to be deleted by a user through FTP? I have a script that generates my thumbnails for me. But I only want half a dozen gallaries at a time and I want to delete one gallery when I upload the next.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@pcthugOct 18.2006 — Probably just a chmod at 0755 would be sufficient, look at the [url=http://www.php.net/manual/en/function.chmod.php]chmod[/url] function. With this said, any changing of permissions will assume the user PHP runs under as the current user. Therefore this may not be sufficient if your system is running a different FTP user.
Copy linkTweet thisAlerts:
@NogDogOct 18.2006 — In most installations with PHP running as an Apache module, you'll probably have to chmod() the files in question to some combination of 7's and 6's (the first bit is the execute permission bit, so it won't affect this). This is because the script will create any files under the Apache user account, so you'll need to add write permission for group or world if you want to delete via another user (e.g. your FTP account).
×

Success!

Help @Charles spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...