Cant delete photos !! Cant delete photos !!
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Cant delete photos !!

Started by syedali, January 31, 2005, 01:49:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

syedali

Hi,
I recently ran in this problem and didnt have it before so I dont know if I messed up something or what happened. I'm the only person who adds photos at my site and I'm the admin/webmaster/and everything else you can think of. Also, I'm using DirectAdmin. Here's what happened:
After uploading the photos with the XP publishing wizard, I went to delete one and it said 'permission denied' (although I was in admin mode!!). So I went to Direct Admin and check the chmod for the folders in the /albums/ folder and everything that I set manually was on 777 while new folders (including the ones that contained this file) was 755. I tried changing the permission but under the UID and GID field it showed 'apache' as the creator of the folder and wont allow me to change permission !!!
I contacted the host company thinking this is their problem but they said that the owner 'apache' needs to change it. I have a few users at my site, but no one is named 'apache'. Plus I dont understand why I, being in the admin mode cant delete something.
Anyone got any clue?

Joachim Müller

the user "apache" is the server. Did you try to manually delete the file, or did you use the coppermine user interface?

Joachim

syedali

I tried to use coppermine interface. Whats confusing me is two things....why is the server listed as a user...and why as an Admin I cant delete it??

Nibbler

The folder was created by the server, not some user in coppermine. You cannot delete it since you do not have full control over the server, coppermine cannot give you that. You would need to ask your host to delete the file for you, or chown it so it is owned by you and then you will be able to delete it.

Joachim Müller

the user apache owning a file should not be confused with a user set up in coppermine: it is a user that exists on the server itself, it is used to manage the file system (opposed to a user in coppermine, who exists in the mySQL database). This is the way things work on webservers: all files and folders are owned by a user (they have to be owned), and there are different levels of permissions. The apache user owning your files is one aspect of what you know as CHMOD. As Nibbler suggested: asl your webhost to CHMOD/CHOWN for you. You could send them a link to this thread if you're not sure what to tell them exactly, they should understand.

Joachim

syedali

Thanks for the reply guys. I just contacted my webhost like 5 min ago, so I'll let you know if need some more help. However, I'm still not sure what I'm doing wrong, coz everytime I'm uploading the photos, they get owned by apache ! It didnt use to be like this, so I dont know what happened. I was playing around with the xp upload mod a bit, but I had backup of everything I changed, and later when I didnt like the mod, I simply went back by replacing the new (mod) files with the old (backed-up) ones. I'm not sure if that has anything to do with all this, but thats when I realised I am running into trouble.
Is there a way not to have apache own them when I upload them??? When I upload using the XP publish wizard (the original one) it asks me to enter my webserver admin login/pw, and the folders would then used to be owned by my admin login. But now its own my apache which makes no sense to me. If I was uploading them through the coppermine interface, I can understand how a coppermine user is not a server user. But I'm using the publishing wizard, which is suppose to (and used to) make the folders own by the webadmin. 

syedali

I just got the response back from the my webhost. Here's what I was told:
======
It's not a CHMOD issue, it's an ownership issue.  Coppermine uploads
them through PHP, which is run by user APACHE - not by user jafrifam ...
you dont own them, you can't modify them.  Another PHP / APACHE owned
script CAN modify them - you'd have to check with Coppermine to see if
they have such a utility.

You dont want them CHMOD 777 - with that, anyone could upload ANYTHING
to your site - including malicious scripts.  they should be 755 at the
most.

I've fixed these directories so they're owned by you.  New ones will
continue to be owned by Apache however.

Joe
======
"jafrifam" is my webserver admin login. I use it to upload photos through XP publishing wizard and as I said before it doesnt show me ("jafrifam") as the owners of those photos after I upload them!!
Any help will be appreciated

Joachim Müller

then using the "delete files" option in coppermine's user interface should work fine, it's exactly what your webhost suggests. Once files exist in coppermine's database, you mustn't touch them using your ftp app.

Joachim