Hello everyone,
I got permission problem when uploading a big rpm file as artifact, but a small file is working. Strange. Here is the details:
Problem:
Cannot upload a big rpm file as artifact by pulp artifact upload
as a non-privileged user.
as a non-privileged user, I tried to upload two rpm files as artifact, strange, for the small file, it works. But the big rpm file(maybe when it is more than 1MB), not working.
Here is for the small file 114K:
-rw-r--r-- 1 xxx xxxxxx 114K Sep 14 2017 uom-systems-0.7-1.el7.noarch.rpm
(pulpcli_venv) [xxx@xxxxxx ~]$ pulp artifact upload --file uom-systems-0.7-1.el7.noarch.rpm
Uploading file uom-systems-0.7-1.el7.noarch.rpm
{
"pulp_href": "/pulp/api/v3/artifacts/77d005a8-7d7c-44bc-b456-56eed72b9189/",
"pulp_created": "2023-10-27T15:12:29.178205Z",
"file": "artifact/9b/ede41ba5143417f563e5ee346857f33476433552e210176ca0f519373713b7",
"size": 115804,
"md5": null,
"sha1": null,
"sha224": "d1ab2a7607fde532181000e9b82a6370a8193fa4750f191d5ef62bfa",
"sha256": "9bede41ba5143417f563e5ee346857f33476433552e210176ca0f519373713b7",
"sha384": "f67286cd1c33cb2117332e1484b3ddd968fd6c5fa924ce567a9f81a16b22db54cfb60203f35e39f831ef18a5986b6087",
"sha512": "03a455ccd97f9e2552bdc9440e0e7cd8390102f0b0b6d963006fe23774da96a6bb2f8b11ec4632faaa0c2bde4c49b2e5a1644acb914c140d8c91566905fbc541"
}
Here is for the big file 91M:
-rw-r--r-- 1 xniu ccin2p3 91M Jul 13 2019 firefox-60.8.0-1.el7.centos.x86_64.rpm
(pulpcli_venv) [xxxx@xxxxxx ~]$ pulp artifact upload --file firefox-60.8.0-1.el7.centos.x86_64.rpm
Uploading file firefox-60.8.0-1.el7.centos.x86_64.rpm
Error: {"detail":"You do not have permission to perform this action."}
The error message on server log is like this:
Oct 27 16:49:56.305 xxxxx gunicorn[619003]: pulp [b53a16886b2e4a049963083e1397157f]: django.request:WARNING: Forbidden: /pulp/api/v3/uploads/4ccb0f01-a3b5-40ae-a0f9-490ba9397073/
I am under the same virtual env and using the same user account.
I don’t know why. Maybe related to chunk and permission for chunk?
What could be the reason? How to solve the problem?
Thanks in advance
Pulpcore version:
“component”: “core”,
“version”: “3.22.14”,
“package”: “pulpcore”
Pulp plugins installed and their versions:
“component”: “rpm”,
“version”: “3.19.9”,
“package”: “pulp-rpm”
Operating system - distribution and version:
Rocky 9
Other relevant data: