confusion about user quota confusion about user quota
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

confusion about user quota

Started by brynn, October 28, 2013, 07:15:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brynn

Hi Friends,
I'm thinking of setting limits to how much users can upload, according to their user group.  If I understand correctly, this should be done in Group Manager > Quota.  Is that correct?

I'm reading the manual about it, and am quite confused.  The first paragraph of the Quota section says:

"Specify the maximum web space usage that the images (or other files if you allow them) uploaded by a user who is member of that particular group you assign the quota for is allowed to consume. The quota is set in kilobytes (KB) and only applies for the files uploaded into a personal gallery of a user. Uploads of that user that go into public albums are not being taken into account and don't add to the quota of that user."

My understanding is that the quota limits only what a user in this group uploads to their personal album.  Does that mean they can upload unlimited to public albums?

But then the 2nd paragraph says:

"The disk quota applies only for groups where "Personal gallery" has been set to "Allowed". Both files uploaded by a user into his personal gallery as well as files uploaded to public galleries are included in the quota. The quota applies to each member of the group. Set the quota to a value that actually makes sense - setting it to several terrabytes does not make sense and may lead to funny side-effects."

Is the "disk quota" a different kind of quota, than the quota in the 1st paragraph?  The 1st paragraph says the quota only applies to the personal gallery, not to the public albums.  But then the 2nd paragraph says the quota applies to both personal and public albums.

Are my eyes just too tired that I've missed a word somewhere?  I've read and re-read many times, and I just can't make sense out of it.

Would someone be so kind as to explain?

Also, the reason I was consulting the manual in the first place -- I was wondering if there is any place to look, to find out how much space an album is using.  First, I was going to use an existing album to get an idea about how many images (very roughly, I realize) are needed to make up for example, 5 mb or 10 mb, etc.  And 2nd, then down the road, the admin might want to see how close a user is getting to their quota.  Or maybe the user might be curious as well?  So is there any way to see how much space an existing album contains?

Thank you very much   :)

Αndré

Seems that we need to adjust the docs, as
Quote from: brynn on October 28, 2013, 07:15:16 PM
only applies for the files uploaded into a personal gallery of a user. Uploads of that user that go into public albums are not being taken into account and don't add to the quota of that user.
and
Quote from: brynn on October 28, 2013, 07:15:16 PM
The disk quota applies only for groups where "Personal gallery" has been set to "Allowed".
isn't correct as far as I know. All files are added to the users' quota.


Quote from: brynn on October 28, 2013, 07:15:16 PM
is there any way to see how much space an existing album contains?
No.

brynn

Aahh...

Thank you very much,  Andre   :)

Αndré

#3
Towards my statements, this is correct:
Quote from: http://documentation.coppermine-gallery.net/en/groups.htm#group_cp_quota_scopeUploads of that user that go into public albums are not being taken into account and don't add to the quota of that user.
Even if I already exceeded the quota in private albums, I still can upload files to public albums (*). Thus, this part is wrong and needs to be corrected:
Quote from: http://documentation.coppermine-gallery.net/en/groups.htm#group_cp_quota_scopeBoth files uploaded by a user into his personal gallery as well as files uploaded to public galleries are included in the quota.


However, the display of the space used is misleading in the groups user manager, as it takes all uploaded files of the user into account, e.g.
QuoteSpace used/Quota
12053/1024 KiB
That makes sense if the admin wants to know how much space each user currently use, but it doesn't say anything regarding the actual used quota. The user manager describes that column as follows:
Quote from: http://documentation.coppermine-gallery.net/en/users.htm#user_cp_pageThe "Space used" column shows how much of the space that is assigned to the user has already been used. The total space the user is allowed to have ("Space Quota") depends on the user's group - which you set in the groups panel. As the least restrictive quota applies, the space usage bar may look inacurate on some setups if your users are members of several groups with several different quotas.


(*): In my opinion it doesn't make sense to apply the quota just to personal albums, at least that's not how my personal gallery is structured and used. As we cannot change that behavior in cpg1.5.x, we should leave it as-is and just fix the docs.

brynn

So for public albums, there can be no restriction?  So for example, if there were a disgruntled member who was allowed to upload to a public album, could they actually upload hundreds of mb worth of ugly images for spite and anger?  Could this be a risk of not having a quota for public albums (and only personal albums).

"Space used" column??  Where is that?  That's what I was asking about in the op.  Oh, I see, in the user manager.  Since my gallery is bridged with SMF, I apparently don't have that space used info.  That would be a nice feature request, to have it available for bridged galleries.  Unless I've misunderstood something.....

Actually, should I report this separately?  Whenever I click on Users/Groups > User (which I guess normally opens something which the bridging has disabled) I get the following error msg:

Critical error
There was an error while processing a database query

Should I report that in a different board?  Or that's correct behavior and I should just ignore it?

Thanks again  :)

Αndré

Please enable debug mode to get an extended error message. Then we're able to decide what's wrong.

brynn

Ok, I have the info.  But should I make a new topic for it?

brynn

I guess I could put it here, since I started the topic.  But how much of it do you need?  There's a little box in the "critical error" area with some text.  Then Show/Hide which gives more.  And then there's a Display php info button, with more.

Well, I'll put the first part.  Let me know if you need more.

While executing query 'SELECT id_member AS user_id, real_name AS user_name, email_address AS user_email, date_registered AS user_regdate, last_login AS user_lastvisit, is_activated AS user_active, COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota FROM `brynn_brynn`.smf_members AS u INNER JOIN `brynn_cpgic`.cpg15x_usergroups AS g ON u.id_post_group+100 = g.group_id LEFT JOIN `brynn_cpgic`.cpg15x_pictures AS p ON p.owner_id = u.id_member GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25;' in bridge/udb_base.inc.php on line 230

mySQL error: SELECT command denied to user 'brynn_brynn'@'localhost' for table 'cpg15x_usergroups'

(I'm not sure how, but I wonder if this could be part of the problem I'm having with hot pics plug-in?)

Αndré

Quote from: brynn on November 02, 2013, 01:46:30 AM
mySQL error: SELECT command denied to user 'brynn_brynn'@'localhost' for table 'cpg15x_usergroups'
That's an MySQL permission issue. Your MySQL user "brynn_brynn" needs at least read permissions to the table cpg15x_usergroups of your Coppermine database. Please ask your hosting provider for support if cannot fix that yourself.



Quote from: brynn on November 01, 2013, 02:06:29 AM
So for public albums, there can be no restriction?  So for example, if there were a disgruntled member who was allowed to upload to a public album, could they actually upload hundreds of mb worth of ugly images for spite and anger?  Could this be a risk of not having a quota for public albums (and only personal albums).
I just said how it's currently coded. IMHO I'd apply the quota to all uploads, but we cannot change that behavior for cpg1.5.x. Of course you could modify your gallery accordingly, but I haven't checked yet if it's an easy or complex mod.

brynn


Αndré