Jump to content

Recommended Posts

Posted

First time posting, just joined tch for family website.

 

I am having some problems in the File Manager with changing the permissions on a folder.

 

I installed gallery, and the albums folder I was suppose to change using chmod -R 777. I couldnt find a way to do a recursive chmod through the File Manager, so just changed that folder to 777. Now I have a subfolder inside the root album folder that I cant change its permissions. When I change them, it returns saying that the permissions were changed, but when I re-select that folder, its permissions are the same as before.

 

My understanding for this is because the subfolder was created by php through gallery, which runs as a different user, so I can't change the permissions on the folder.

The permission settings next to the name of the folder are 755, but when you select the 'change permissions' link, the settings are set to 750.

 

So now when I try to upload any file straight to that folder through the file manager, it gets a permission denied error trying to move ( mv ) the file from the temp upload folder to my folder.

 

When going through the gallery upload, I can upload smaller files, but when I try to upload larger files ( 2M+ ), I see similar results, where it doesnt get moved to my subfolder.

 

So my questions:

 

1) What is the php.ini setting for max file upload size set at?

2) How can I perform a recursive chmod without shell access?

3) How can I change the permissions on these subfolders within my gallery root folder? Deleting them is an option, as long as I can get permissions working on these subfolders for the future.

 

 

Thanks you for any help. I have been very happy with tch.

 

 

Dan

Posted

Hi Dan

 

First of all.....

 

:) Welcome to the Family :D :P

 

Part of the problem may be a peculiar effect in cPanel. To check what the permissions are, look in the left hand window, and after the filename (on the very right hand side) should be the permissions. If you go to "change permissions" and then look at the boxes where you change it, it does not always show as default the current permissions.

 

You should be able to change the permissions via File manager unless, as you say, the file was created by php, and you are not the owner.

 

You can also change permissions with some FTP programs, which can be helpful if you want to do some recursive changes.

 

If you are still having problems, submit a help ticket, and we'll have a look at it for you.

 

Andy

Posted

:) Welcome to the family Dan :D

 

If you want to try to change file permissions with an ftp program,

there are a few free ones suggested in the Suggest a Product or Program forum

such as coreftp and smart ftp

 

In both you can change permissions by selecting a file and then right click to select properties.

 

Again welcome to your new home!

Posted

Thanks for the replys. I had to enter a ticket to get folder permissions changed. I still have my first question yet to be answered.

 

What is the max file size upload set to in the php.ini file? It appears to be around 2M. Is that the case. Can that be overwritten in the .htaccess file?

 

I am able to upload 2M+ files through cpanel file manager which is not php, but not through php based gallery.

 

thanks again.

Guest twelves
Posted

Hay, we are in the same boat.

 

Let me guess your problems.

 

Server Upgrade to the Cpanel Cracked up your Gallery Album and switched the file permissions up? Or Apache Upgrades?

 

Something like this?

 

Warning: fopen(/home/stringn/public_html/Albums/The-String-Network-Community/photos.dat.lock): failed to open stream: Permission denied in /home/stringn/public_html/modules/gallery/platform/fs_unix.php on line 55

Error: Could not open lock file (/home/stringn/public_html/Albums/The-String-Network-Community/photos.dat.lock)!

Warning: fopen(/home/stringn/public_html/Albums/The-String-Network-Community/album.dat.lock): failed to open stream: Permission denied in /home/stringn/public_html/modules/gallery/platform/fs_unix.php on line 55

Error: Could not open lock file (/home/stringn/public_html/Albums/The-String-Network-Community/album.dat.lock)!

 

Also you can not get the php.ini file changed to higher then 2 megs default?

Did you try the .htaccess fix? Still can’t get it?

 

I don’t think you are. It’s not going to be easy. Perhaps someone on the list has a working .htaccess for max_post (2 meg) to say 12 megs. I don’t know.

 

None I used did the trick.

 

I would like to know if your Gallery is working? I also can not change file access in Gallery Albums. My users think it’s gross with the code…

 

Please let me know your results?

 

If you need a CGI uploader I know of some. I failed with PHP uploaders and the 2 meg upload limit.

 

http://www.12string.net

 

 

My Messed Gallery:

 

http://www.12string.net/modules.php?op=mod...lude=albums.php

 

 

My CGI uploader:

 

http://www.12string.net/upload.html

 

 

 

Let me know, perhapse we can help each other.

 

Jay.

Posted

The .htaccess file cannot override some settings. If it could we'd have a mess. We are operating on shared hosting which means that no one user can, or should, be allowed to set up as if he or she is the only account on the server. The default for upload_size in php.ini is 2 megs. I have moved it up to 8 on your server and that is as high as we can move it.

 

As for the problems with Gallery, go to the Gallery forums and you will see that it does not like changes in php. If php changes it breaks. I changed the permissions on your Albums folder and it is working fine now as far as I can see.

Guest twelves
Posted

FANTASTIC!

 

:(

 

This is great news!

 

Thanks very much.

 

Sorry if I sound like a little nut ball.

 

Its hard to put all this into place being a non progroamer.

 

Takes me days and days to do simple things.

 

Rock Sign :dance:

 

Now I can install the new Php Uploader my friend produced just for me.

  • 1 year later...
Posted

Thanks for this thread. I've been messing with .htaccess and php.ini to no avail. I was also following this link and tried #1 and #2, but couldn't find the add_photos.php, so didn't figure that out.

 

I can see that it allowed me 128 MB in a batch:

 

Note: You can upload up to 128 megabytes at one time. No individual file may be larger than 2 megabytes. If you want to upload more than that, you must upload the files separately, use a different upload format, or ask your system administrator to allow larger uploads.

 

Not that I'd need that, I just need the occasional movie uploaded that's bigger than 2 MB. I just submitted a ticket requesting the max single upload be increased to 8, thanks.

 

However, I was wondering why I couldn't upload it even via FTP or cPanel (File Manager). The permissions on those folders (albums, etc.) are 755 and I couldn't change them in FTP (FileZilla) to 777. I guess they're locked somewhere? I guess they're locked in Gallery somewhere so I don't use FTP to upload?

 

I just tried Add Items From Web Page and used a URL where I just uploaded video (e.g. www.mysite.com/videos/) and that worked.

 

Thanks.

 

- Bradley

Posted
However, I was wondering why I couldn't upload it even via FTP or cPanel (File Manager). The permissions on those folders (albums, etc.) are 755 and I couldn't change them in FTP (FileZilla) to 777. I guess they're locked somewhere? I guess they're locked in Gallery somewhere so I don't use FTP to upload?

The only reason you wouldn't be able to change the permissions on a file or folder is if you do not own it. Files and folders created by a PHP script are owned by the user 'nobody'. You can't use your FTP program or the CPanel File Manager (which run under your user ID) to change the permissions on files or folders created by a PHP script.

 

When a directory owned by 'nobody' has its permissions set to 0755, only the user 'nobody' has write permissions in the directory. This would prevent your FTP program and CPanel's File Manager (again, which run under your user ID) from creating any new files at all in this directory.

 

I just tried Add Items From Web Page and used a URL where I just uploaded video (e.g. www.mysite.com/videos/) and that worked.

That's because you're using a PHP script to perform the upload, which runs as the user 'nobody'. The user 'nobody' has write permissions in the directory, so the script is able to upload the file into this directory.

  • 1 month later...
Posted
The only reason you wouldn't be able to change the permissions on a file or folder is if you do not own it. Files and folders created by a PHP script are owned by the user 'nobody'. You can't use your FTP program or the CPanel File Manager (which run under your user ID) to change the permissions on files or folders created by a PHP script.

 

When a directory owned by 'nobody' has its permissions set to 0755, only the user 'nobody' has write permissions in the directory. This would prevent your FTP program and CPanel's File Manager (again, which run under your user ID) from creating any new files at all in this directory.

That's because you're using a PHP script to perform the upload, which runs as the user 'nobody'. The user 'nobody' has write permissions in the directory, so the script is able to upload the file into this directory.

 

I just wanted to thank you very much for that extremely clear response. It saves me lots of trying and time.

 

Best regards ... wow, I almost wrote, " ... and have a nice weekend." Shows you what kind of weekend I've been having!

 

- Bradley

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...