uglifyjs command permission denied - linux

I have a strange problem about my uglifyjs command.
The uglifyjs file looks like below
#!/usr/bin/env /usr/local/bin/node
// -*- js -*-
"use strict";
require("../tools/exit");
var fs = require("fs");
var info = require("../package.json");
And when Apache run it under its user (daemon), I got permission denied error in the PHP log.
/usr/bin/env: /usr/local/bin/node: Permission denied
I checked those file permissions and all users have read and run permission.
lrwxrwxrwx 1 root root 50 May 13 2019 /usr/local/bin/node -> /home/ec2-user/.nvm/versions/node/v6.11.1/bin/node
-rwxrwxr-x 1 ec2-user ec2-user 29851602 Jul 11 2017 /home/ec2-user/.nvm/versions/node/v6.11.1/bin/node
-rwxr-xr-x 1 root root 28880 Aug 1 2018 /usr/bin/env
I am using AWS EC2 server.
Please help me and thanks in advance.

Related

node: permission denied. How to fix?

The permission for nodejs is showing blank. I am not sure how it got changed. I am not able to remove or start node. How to fix this?
/usr/bin# ls -la | grep node
lrwxrwxrwx 1 root root 45 Feb 1 14:40 corepack -> ../lib/node_modules/corepack/dist/corepack.js
---------- 1 root root 75421096 Feb 1 08:05 node
lrwxrwxrwx 1 root root 4 Jun 26 00:44 nodejs -> node
lrwxrwxrwx 1 root root 38 Feb 1 14:40 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root 38 Feb 1 14:40 npx -> ../lib/node_modules/npm/bin/npx-cli.js
/usr/bin# node
-bash: /usr/bin/node: Permission denied
/usr/bin# chmod -v 777 node
chmod: changing permissions of 'node': Operation not permitted
failed to change mode of 'node' from 0000 (---------) to 0777 (rwxrwxrwx)
For me, re-installing node with NVM solved the issue:
Install nvm
nvm install 14
nvm use 14

Permission for singularity

I am got an issue when running the whole pipeline of ChIP-seq using profile singularity on my local PC (window but subsystem Linux)
Error executing process > 'output_documentation'
Caused by:
Failed to pull singularity image
command: singularity pull --name nfcore-chipseq-1.2.2.img.pulling.1630098407814 docker://nfcore/chipseq:1.2.2 > /dev/null
status : 255
message:
INFO: Using cached SIF image
FATAL: While making image from oci registry: error copying image out of cache: could not open temporary file for copy: failed to change permission of ./tmp-copy-2575820807: chmod ./tmp-copy-2575820807: operation not permitted
I'm using singularity 3.8.2
I also have specified NXF_SINGULARITY_CACHEDIR to a hard drive instead of /home/.singularity
I also checked the folder to make sure all the file can be accessed
total 0
drwxrwxrwx 1 root root 4096 Aug 28 05:06 .
drwxrwxrwx 1 root root 4096 Aug 28 04:47 ..
-rwxrwxrwx 1 root root 0 Aug 28 04:53 tmp-copy-2299332276
-rwxrwxrwx 1 root root 0 Aug 28 05:06 tmp-copy-2575820807

how do you enable all users access to odbc driver in linux

I have setup an odbc connection in linux that connects to MSSQL server:
This is the location and permission of .ini and inst files:
-rw-r--r-- 1 root root 169 Aug 7 17:00 odbc.ini
-rw-r--r-- 1 root root 188 Aug 7 16:40 odbcinst.ini
This is the permission to the mssql server driver:
-rwxrwxrwx 1 root root 1855896 Aug 7 16:39 /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0
When I am logged in as a user to the system, I do ls on that file, I get permission denied error, as follows:
~> ls -l /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0
ls: cannot access /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0: Permission denied
It has read, write, and execute permission for all users. When I am logged in as a user, not root, I cannot connect to the db from linux. When I am logged in as root, I can establish an ODBC connection the sql server. What I am doing wrong here. I need everyone to establish odbc connection.
others did not have permission on the drivers directory, this command fixed my issue:
chmod -R o+rx /opt/microsoft/msodbcsql/11.0.2260.0

CentOS and fontconfig: Cannot load default config file

I'm getting following error when using imagick:
Fontconfig error: Cannot load default config file
My script is working but i would like to fix this (is filling up log file).
OS is:
# cat /etc/redhat-release
CentOS release 5.10 (Final)
I was looking trough internet little bit and this is causing problem:
access("/etc/fonts/fonts.conf", R_OK) = -1 ENOENT (No such file or directory)
Folder exists:
# ls /etc/fonts/ -all
total 64
drwxr-xr-x 4 root root 4096 Jul 9 2010 ./
drwxr-xr-x 86 root root 12288 Jan 13 00:48 ../
drwxr-xr-x 2 root root 4096 Jan 3 2012 conf.avail/
drwxr-xr-x 2 root root 4096 Apr 14 2013 conf.d/
-rw-r--r-- 1 root root 5239 Jan 12 2008 fonts.conf
-rw-r--r-- 1 root root 6907 Jan 12 2008 fonts.dtd
But i see only this folder via root account, other account under with script is run doesn't see this folder. Permissions looks fine for me, but not so experienced with linux.
Account under with script is run is created with WHM.
Please help :)
I manage to solve my problem. chroot was making trouble.
I need to:
log with root account
find jailed environment of account on with i run script (in my case /home/virtfs/[username])
to create folder where i will mount real stuff mkdir /home/virtfs/[username]/etc/fonts
to mount /etc/fonts to this folder: mount --bind /etc/fonts /home/virtfs/[username]/etc/fonts
Posting an answer for CentOS 7 in 2021:
yum install fontconfig
More info here:
https://centos.pkgs.org/7/centos-x86_64/fontconfig-2.13.0-4.3.el7.x86_64.rpm.html

svn permission issue - txn-current-lock: Permission denied

I setup svn on my local system /svn/repos/myproject by following this tutorial. I'm able to view the repo in browser.
But when it try to import new project I couldn't through svn client ( rapid svn ) it shows following error:
Execute: Import
Error while performing action:
Can't open file '/svn/repos/myproject/db/txn-current-lock': Permission denied
Svn directory permissions:
→ ls -l /svn
total 12
drwxrwxr-x 2 root root 4096 Feb 15 12:09 permissions
drwxrwxr-x 4 apache apache 4096 Feb 15 12:09 repos
drwxrwxr-x 2 root root 4096 Feb 15 12:09 users
Repo directory:
→ ls -l
total 8
drwxrwxr-x 3 root root 4096 Feb 15 12:09 conf
drwxrwxr-x 7 apache apache 4096 Feb 15 12:09 myproject
How to solve this issue?
I've given 777 permission to repos directory which solved this issue. But i got another issue like Couldn't perform atomic initialization.
I think this is due to incompatible sqlite version with subversion we're using, this can be solved by updating svnadmin command,
svnadmin create --pre-1.6-compatible --fs-type fsfs /svn/repos/myproject

Resources