Recent Topics

1 Dec 06, 2007 11:03    

2.x

Is there a reason why I cant delete uploaded pictures in the media/blogs/ directory via my server? There are folders up there for blogs that Ive deleted so they're just taking up space. I can delete empty folders just not those with images in them.

Am sure theres a simple answer?
Thank you, S

Edit: Did you know the Version drop box doesnt work when you select 2.x. It shows your version as 1.10x (when starting a new topic).

2 Dec 06, 2007 11:14

Re old Media directory folders... you may have to change their chmod value

3 Dec 06, 2007 11:23

Ive tried. They're currently set to 664. Any attempts at changing gave me this error message:

/home/nzescort/public_html/blog/media/blogs/a/_DSC0006.JPG chmod failed: Operation not permitted in /home/nzescort/public_html/blog/media/blogs/a

4 Dec 08, 2007 18:16

I had the same problem with 1.9.x version. It's gone after I upgraded to the latest beta. ;)

5 Dec 08, 2007 18:31

@sallym: you need to CHMOD the folders, not the files. B)

Good luck

6 Dec 09, 2007 04:56

I gave up on file manager for uploading. When it's time to wipe something out I go to my host's cpanel and use their file manager. Damn blog acted like *it* was gonna own my files & folders? GRRRRR!!!!!!

So this is fixed in 220? Oh well. I'm now completely in the habit of uploading via FTP and using file manager only to insert an image in a post.

Anyway I found it very easy to take control back via cpanel's file manager.

7 Dec 15, 2007 14:09

Sorry for the slow reply, have been out galivanting.

Still having no luck. Ive tried changing CHMOD on files and folders in all directions but nothing is working. Permission denied at the end of every road.

8 Dec 15, 2007 17:56

Put this script in the root of your server or in the /blog/ directory, just where the /media/ folder is. Name the script ' permission.php' and call the script from within your browser, like www.YOURSITE.xxx/blogs/permission.php.

Gather the output and reply to this topic once again.

<?php

$dir = dirname(__FILE__).'/media/';
#$dir = '';

echo 'Current script owner (irrelevant): '.get_current_user();
echo "<br />\n";

$processUser = posix_getpwuid(posix_geteuid());
echo 'Process user:'.$processUser['name'];
echo "<br />\n";

echo '<h1>Dirs:</h1>';
?>

<p>
Effective perms are <strong>highlighted/bold</strong>.
<br />
<span style="color:green">Green</span> user and groupnames can write.<br />
<span style="color:brown">Brown</span> user and groupnames can read.<br />
<span style="color:red">Red</span> user and groupnames cannot read/write.<br />
</p>


<?php

echo '<ul>';
print_dir_owners($dir);
echo '</ul>';

function print_dir_owners($dir)
{
	$uid = fileowner( $dir );
	$gid = filegroup( $dir );

	if( function_exists('posix_getpwuid') )
	{
		$user = posix_getpwuid($uid);
		$user = $user['name'];
		$group = posix_getpwuid($gid);
		$group = $group['name'];
	}
	else
	{
		$user = '#'.$uid;
		$group = '#'.$gid;
	}

	$perms = substr( sprintf('%o', fileperms($dir)), -3 );

	echo '<li>'.$dir.":<br />\n";

	for( $i = 0; $i < strlen($perms); $i++ )
	{
		$highlight = false;
		switch($i)
		{
			case 0:
				if( $uid == posix_geteuid() )
					$highlight = true;
				break;
			case 1:
				if( $gid == posix_geteuid() )
					$highlight = true;
				break;
			case 2:
				$highlight = true;
				break;
		}
		if( $highlight )
			echo '<strong>'.$perms{$i}.'</strong>';
		else
			echo $perms{$i};
	}
	echo ' / ';

	echo '<span style="color:';
	if( $perms{0} < 4 )
		echo 'red';
	elseif($perms{0} < 6)
		echo 'brown';
	else
		echo 'green';
	echo '">'.$user.'</span>';

	echo '/<span style="color:';
	if( $perms{1} < 4 )
		echo 'red';
	elseif($perms{1} < 6)
		echo 'brown';
	else
		echo 'green';
	echo '">'.$group.'</span>';

	if( ($dh = dir($dir)) !== false )
	{
		echo '<ul>';
		while( $entry = $dh->read() )
		{
			if( $entry == '.' || $entry == '..' )
				continue;

			if( is_dir($dir.$entry) )
			{
				print_dir_owners($dir.$entry.'/');
			}
		}
		echo '</ul>';
	}

	echo '</li>';
}


?>

Good luck

10 Dec 16, 2007 05:18

You can easily remove the old folders through ftp.
For the remaining folders you now have a list. My guess is that 755 will work, but you are still asking, so CHMOD the folders to 777.
BTW, this list shows the current setting.

Good luck

11 Dec 16, 2007 05:46

There is something wrong. If permission.php is supposed to be showing me the settings as they are then wires are getting crossed. All of the jpg files actually have permission 664 (according to my CPanelX).

I cant delete from ftp. Thats what I tried to do initially then realised it wouldnt let me:
[17:30:49] 550 Could not delete fit-80x80.JPG: Permission denied

I can change the permissions on the Blogs and Users folders. I cant change permissions on anything inside these. This is the message : /home/nzescort/public_html/blog/media/blogs/apauling chmod failed: Operation not permitted in /home/nzescort/public_html/blog/media/blogs

12 Dec 16, 2007 06:04

Hi All,

Afwas is right. I had the same problem and it was just fixed a few mins ago. I tried to CHMOD my media folder to 775 and the folders under it, blogs and users folders. But it didnt work so I tried CHMODing blogs and users folders to 777 (while media folder is still 775) and it worked. Im gonna try to upload some files and will be back here if I got an error.

13 Dec 16, 2007 06:08

Can you try or have you tried accessing the files through cPanel? You can change file permissions from there also. But I don't know how you try it otherwise. My FTP program lets me change permissions so I manage everything from there.
Can you find anything related to permissions and FTP in the help files / wiki / anything from your host?


Form is loading...