Comments (8)
Hey @g-sahil22 , can you please share how the FOSSology was installed? I see in the logs it says scancode failed to create the dir /root/.cache
which should ideally be $HOME/.cache
. Which means the scancode was started by root user instead of fossy
user.
from fossology.
Hi @GMishx , I use https://fossology.osuosl.org/ and in local deploy via Docker image
from fossology.
I build the https://github.com/juice-shop/juice-shop/ code and then zip it and upload it
from fossology.
I get an identical error when trying to run fossology on a recent glibc tarball. My installation method was to use podman pull fossology/fossology
on my Fedora 39 box, and using from within the container, i.e. docker run -p 8081:80 fossology/fossology
.
from fossology.
@GMishx just @'ing you here since I'm unable to remove the needs-clarification label :)
from fossology.
@GMishx @its-sushant I am getting the same error when i tried to install in stable release version.
[4.4.0], Branch: [HEAD], Commit: [#903df0] 2024/01/15 09:27 +00:00 built @ 2024/02/15 09:21 +00:00
deploy method: Docker compose
this fixed issue in the token generation #2682 but met with below issue slightly different from this original issue
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: "Traceback (most recent call last):"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/usr/local/share/fossology/scancode/agent/runscanonfiles.py", line 11, in "
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " from scancode import api"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/home/fossy/pythondeps/scancode/__init__.py", line 16, in "
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " from commoncode import fileutils"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/home/fossy/pythondeps/commoncode/fileutils.py", line 21, in "
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " from scancode_config import scancode_temp_dir as _base_temp_dir"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/home/fossy/pythondeps/scancode_config.py", line 148, in "
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " _create_dir(scancode_cache_dir)"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/home/fossy/pythondeps/scancode_config.py", line 52, in _create_dir"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " os.makedirs(location)"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/usr/lib/python3.9/os.py", line 215, in makedirs"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " makedirs(head, exist_ok=exist_ok)"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/usr/lib/python3.9/os.py", line 215, in makedirs"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " makedirs(head, exist_ok=exist_ok)"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " File "/usr/lib/python3.9/os.py", line 225, in makedirs"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: " mkdir(name, mode)"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: "PermissionError: [Errno 13] Permission denied: '/root/.cache'"
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: "FATAL ../src/scancode/agent/scancode_wrapper.cc.80: could not execute scancode command: PYTHONPATH='/home/fossy/pythondeps/' python3 runscanonfiles.py -lceu -m 50 /tmp/filewAwMvv /tmp/file1pUHhu "
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: agent failed with error code 1
2024-02-15 09:29:23 scancode [0] :: JOB[2206].scancode[718.localhost]: agent failed, code: 1
update: Inside the container the file has no execute permission
I had no execute permission so I change the file permission
/usr/local/src/fossology$ ll src/scancode/agent/runscanonfiles.py
-rwxr-xr-x 1 dinesh users 6667 Feb 15 09:15 src/scancode/agent/runscanonfiles.py*
and there is .cache folder in the docker in path /root/.cache
where permission denied error occured as mentioned in my error log above in this same comment.
i enabled write permission
next error is
while executing this script
improved the permission of this file runscanonfiles.py
Restarted apache server to take effect above changes.
sudo service apache2 restart
But I am still getting the same error
Traceback (most recent call last):"
File "/usr/local/share/fossology/scancode/agent/runscanonfiles.py", line 11, in "
from scancode import api"
File "/home/fossy/pythondeps/scancode/__init__.py", line 16, in "
from commoncode import fileutils"
File "/home/fossy/pythondeps/commoncode/fileutils.py", line 21, in "
from scancode_config import scancode_temp_dir as _base_temp_dir"
File "/home/fossy/pythondeps/scancode_config.py", line 148, in "
_create_dir(scancode_cache_dir)"
File "/home/fossy/pythondeps/scancode_config.py", line 52, in _create_dir"
os.makedirs(location)"
File "/usr/lib/python3.9/os.py", line 215, in makedirs"
makedirs(head, exist_ok=exist_ok)"
File "/usr/lib/python3.9/os.py", line 215, in makedirs"
makedirs(head, exist_ok=exist_ok)"
File "/usr/lib/python3.9/os.py", line 225, in makedirs"
mkdir(name, mode)"
PermissionError: [Errno 13] Permission denied: '/root/.cache'"
FATAL ../src/scancode/agent/scancode_wrapper.cc.80: could not execute scancode command: PYTHONPATH='/home/fossy/pythondeps/' python3 runscanonfiles.py -lceu -m 50 /tmp/filelIQKq3 /tmp/fileH1T0M2 "
2024-02-15 13:01:23 scancode [0] :: JOB[2246].scancode[2749.localhost]: agent failed with error code 1
2024-02-15 13:01:23 scancode [0] :: JOB[2246].scancode[2749.localhost]: agent failed, code: 1
FYI: Not sure what more I need to do for the above permission change to take into effect. If I restart the docket the above changes vanishes.
also i think the file runscanonfiles.py
with ownership of fossy user and group permission is causing the problem while trying to change the /root/.cache
folder which is under file ownership root user and root group permission. while both have write & execute permission clearly.
I tried to change the ownership of .cache to fossy as well. And ran the scancode agent. it didn't work.
Not sure if the fossology application takes the changes that is made in the container.
from fossology.
Hi @g-sahil22 / @dineshr93,
Setting the following environment variable SCANCODE_CACHE='/home/fossy/.cache
on the container level, fixed the scan code issue for us.
or enforce in the below.
https://github.com/fossology/fossology/blob/4.4.0/src/scancode/agent/scancode_wrapper.cc#L73
from fossology.
Fixed in #2692. PTAL
from fossology.
Related Issues (20)
- Scancode copyright findings are ignored in ReadmeOSS, SPDX, REST API; user copyright findings are ignored in REST API HOT 7
- Reimport of an exported SPDX RDF report is not working (since version 4.2.1.45) HOT 4
- Importing an RDF report can fail with "shortname already in use" when matching with SPDX ID HOT 4
- Uploading a new file to Fossology server via API v2 HOT 6
- SPDX Report generation for files with candidate license failed
- "Require uploadType" error with API v1 HOT 4
- Upgrade the User & Group APIs to Version 2 HOT 1
- Upgrade the Folder & License APIs to Version 2 HOT 2
- Alert mechanism via API
- Call to a member function getId() on null in lib/php/Report/ReportUtils.php HOT 3
- As a User I would like to filter out files by extension on the search box. HOT 2
- The database upgrade failed from version 9.6 to a higher version
- Upgrade the Jobs & Report based APIs to Version 2 HOT 1
- cp2foss does not work from 4.3.0-rc1
- [API ERROR] calling Upload api throws 405 NOT ALLOWED HOT 2
- DB upgrade from < 4.3 to >= 4.3: Possible loss of edited results or main license
- Docker image build failed while upgrading from bullseye to bookworm
- Search functionality for Software Heritage Page and search and filter functionality of file browser page is not working
- scancode fails HOT 3
- "Skip MimeTypes from scanning" Feature is Not Working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fossology.