I just installed Indigo (Eclipse) on my ubuntu 11.10 machine and received a permission denied error when attempting to start Eclipse from the terminal.
ls -l /usr/lib/ | grep eclipse
yields
drwxr-sr-x 9 root ben 4096 2011-10-13 12:10 eclipse_indigo
I tried to sudo chmod 755 eclipse_indigo to no avail.
Any other suggestions would be greatly appreciated.
strace /usr/lib/eclipse_indigo
yields
execve("/usr/lib/eclipse_indigo/", ["/usr/lib/eclipse_indigo/"], [/* 74 vars */]) = -1 EACCES (Permission denied)
dup(2) = 3
fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcabfef8000
lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Permission denied\n", 32strace: exec: Permission denied
) = 32
close(3) = 0
munmap(0x7fcabfef8000, 4096) = 0
exit_group(1) = ?
It's better if you just extract the tar.gz file from http://www.eclipse.org/downloads/?osType=linux in your home directory and use it from there...
I did the same... just wait till you need to install plugins for it. Even if you manage to start it you'll have other issues, so extract the archive and save yourself from some headaches...
Why not to install using your user instead of root?
Try sudo chown ben:ben eclipse_indigo to set yourself as the owner as well as the group-owner. I think your problem is related to that r-s in the group perms field of eclipse_indigo, unless that's a typo.
I had a similar problem on a linux machine, where eclipse was unpacked as root and started by a regular user.
Be careful, not to start eclipse as root, as it does an initialization of the so-called confguration directory inside your installation.
You may find my answer to that question useful (includes steps to fix it up):
Unable to open Eclipse (configuration area .. error)
Related
We had some 12 agents (vsts-agent-linux-x64-2.188.4) running on one Az VM (Ubuntu 20.04.2 LTS) as processes (./config.sh && screen ./run.sh). All was well..
I had to run some command related to /tmp folder but it kept showing busy and we suspected that our Agents might be using /tmp. Unfortunately instead of any other clean way of stopping the agents, we killed all processes on this VM manually, including the agents'.
After the /tmp related command ran successfully, I tried running screen ./run.sh from one of the agent directories. And I got an error:
Failed to create CoreCLR, HRESULT: 0x80004005
I also had tried :
.agent2/run.sh and I got the error :
ldd: ./bin/libcoreclr.so: No such file or directory
ldd: ./bin/System.Security.Cryptography.Native.OpenSsl.so: No such file or directory
ldd: ./bin/System.IO.Compression.Native.so: No such file or directory
ldd: ./bin/System.Net.Http.Native.so: No such file or directory
Failed to create CoreCLR, HRESULT: 0x80004005
I even downloaded a new .tar for the agent and ran a fresh ./config . But I get the same error on ./config as well
Is there a solution to this? Please help
export COMPlus_EnableDiagnostics = 0, and then running ./config from the agent directory. worked!
I had this issue when running as the non-privileged user specified in the systemd file but running as root user worked fine.
Finally used:
strace -f -o trace.log /<executable path>/<executable name>
Which led me to:
9183 mknod("/tmp/clr-debug-pipe-9183-8112345738-in", S_IFIFO|0700) = -1 EACCES (Permission denied)
This caused me to compare the /tmp directory between working and non-working boxes.
[<not-working-hostname>]$ ll /
drwxrwxr-x 7 root root 93 Jan 5 21:37 tmp
[<working-hostname>]$ ll /
drwxrwxrwt 7 root root 93 Jan 5 21:59 tmp
(Note the r-x vs rwt)
Fix:
[<hostname>]# chmod 1777 /tmp
I know there are multiple version of this question on SO, I've tried the solutions posted on those threads and they don't seem to help :(
I have VS Code installed in an Ubuntu VM. I can't seem to get the python linter to work. i.e. I get a message saying
Linter pylint is not installed
I am pretty sure pylint is installed on the VM because when I run which pylint I have a valied output.
Here are the outputs for which python and which pylint respectively
/usr/bin/python
/home/rakshak/.local/bin/pylint
And I have the following in my User settings and workspace settings in VS Code
// Place your settings in this file to overwrite the default settings
{
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/home/rakshak/.local/bin/pylint",
"python.pythonPath": "/usr/bin/python"
}
So, turns out this was just a permissions issue!
When I got the pylint not installed message, I was presented with a button to "Install pylint" this runs
sudo pip install pylint
This changed the owner of my .local/lib/ to root and made it inaccessible to vscode.
Output of ls -ld ~/.local/lib/ was
drwx------ 3 root root 4096 Sep 24 10:49 /home/userName/.local/lib/
Runing chown with my group and user fixed this issue.
sudo chown -R group:user ~/.local
now the output of ls -ld ~/.local/lib/ reads
drwx------ 3 userGroup userName 4096 Sep 24 10:49
/home/rakshak/.local/lib/
Have you checked with which python version you have installed pylint?
If you have used python 3.6 then the setting has to be like this:
"python.pythonPath": "/usr/bin/python3.6"
I was first getting this issue: https://github.com/facebook/react-native/issues/10088
Then I followed this solution to resolve for that issue: https://github.com/facebook/react-native/issues/910#issuecomment-94181845
Now when I enter npm start I get [sane] Warning: Lost connection to watchman, reconnecting... Any suggestions?
Update: This started happening when I updated my MacOS to MacOS Sierra.
Update: So I tried running react-native run-ios which opens a new console window and invokes npm start. Its still gives the [sane] Warning: Lost connection to watchman, reconnecting.. warnings but its builds the bundle. So watchman connection is getting broken in between. Here is the console screenshot:
I solved this problem by following the solution provided by David but I had to do some extra steps because I already had installed watchman using brew. Here are the list of commands for the solution:
Deleting watchman (installed by brew):
$ brew install rmtree
$ brew rmtree watchman
$ sudo rm -rf /usr/local/var/run/watchman
Manually install Watchman v4.7.0 (credits to David):
$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.7.0
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
Chmod your user's watchman state directory:
$ chmod 0700 /usr/local/var/run/watchman/<user>-state
run this command inside project folder
watchman watch-del-all && npm start --reset-cache
I have a simular issue and looking at the logs for Watchman I get these errors happening each time you see the "Lost Connection to Watchman" message.
2016-11-05T03:35:48,401: [listener] Watchman 4.7.0 <no build info set> starting up on Davids-Mac.local
2016-11-05T03:35:48,401: [listener] path /Users/david/Projects/react-native-test is on filesystem type hfs
2016-11-05T03:35:48,402: [listener] root /Users/david/Projects/react-native-test using watcher mechanism fsevents (auto was requested)
2016-11-05T03:35:48,406: [listener] file limit is 2560 kern.maxfilesperproc=10240
2016-11-05T03:35:48,406: [listener] raised file limit to 10240
2016-11-05T03:35:48,407: [listener] Using socket from launchd as listening socket
2016-11-05T03:35:48,934: [io 0x7f8175600ff8 /Users/david/Projects/react-native-test] PERF: {"ru_nvcsw": 0, "ru_nsignals": 0, "ru_msgrcv": 6, "ru_msgsnd": 6, "ru_inblock": 0, "ru_majflt": 0, "ru_nswap": 0, "ru_minflt": 5230, "ru_ixrss": 0, "ru_maxrss": 21405696, "system_time": 0.32367200000000002, "user_time": 0.18271599999999999, "elapsed_time": 0.53129999999999999, "pid": 9867, "ru_idrss": 0, "meta": {"root": {"watcher": "fsevents", "ticks": 2, "number": 1, "case_sensitive": false, "recrawl_count": 0, "path": "/Users/david/Projects/react-native-test"}}, "version": "4.7.0", "ru_oublock": 0, "ru_nivcsw": 112, "start_time": 1478316948.403332, "description": "full-crawl"}
2016-11-05T03:35:48,935: [io 0x7f8175600ff8 /Users/david/Projects/react-native-test] crawl complete
2016-11-05T03:35:49,029: [client=0x7f8176a00038:stm=0x7f8176a00000] Unilateral payload for sub sane-sub {"settled": true}
Terminating due to signal 11 Segmentation fault generated by pid=0 uid=0. address not mapped to object (0x0)
0 watchman 0x0000000105973759 _ZL13crash_handleriP9__siginfoPv + 347
1 libsystem_platform.dylib 0x00007fffa2292bba _sigtramp + 26
2 ??? 0x00007f81756000c0 0x0 + 140193996734656
3 watchman 0x000000010596f9b2 _ZN6detail22estimateSpaceToReserveIPKcJA3_cA28_c8w_stringA2_cPcS6_EEEmmRKT_DpRKT0_ + 109
4 watchman 0x000000010596f815 _ZN8w_string5buildIJPcRA4_KcPS2_RA3_S2_RA28_S2_RS_RA2_S2_RS1_SC_EEES_DpOT_ + 121
5 watchman 0x000000010599b4cb _ZN8watchman3Log3logIJRA28_KcR8w_stringRA2_S2_RPcS8_EEEvNS_8LogLevelEDpOT_ + 183
6 watchman 0x000000010599a6e0 _ZNSt3__114__thread_proxyINS_5tupleIJZL15make_new_clientP15watchman_streamE3$_0EEEEEPvS6_ + 952
7 libsystem_pthread.dylib 0x00007fffa229cabb _pthread_body + 180
8 libsystem_pthread.dylib 0x00007fffa229ca07 _pthread_body + 0
9 libsystem_pthread.dylib 0x00007fffa229c231 thread_start + 13
UPDATE:
Ok, found a solution which so far seems to work. I uninstall watchman completely, then build it from source using the following which seems to work fine (any attempt at installing via brew causes the problems above but this works):
$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.7.0 # the latest stable release
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
I am starting with perl and wanted to install the IDE Padre on Ubuntu 14.04.
The answers in this question indicate that I simply can use apt-get:
sudo apt-get install padre
I also tried to install it with:
sudo cpan Padre
as indicated here.
However, when I run padre, it gives me the following error:
DBD::SQLite::db selectall_arrayref failed: attempt to write a readonly database at (eval 1905) line 41.
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detached
And when I run it as root (sudo padre):
DBD::SQLite::db do failed: Safety level may not be changed inside a transaction at (eval 1905) line 37.
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detached
padre --version shows me: Perl Application Development and Refactoring Environment 1.00, and my perl version is 5.18.2.
In the /usr/bin/padre script I do not see any reference to an SQLite database. Does anyone know how I can solve this issue?
Finally I found the solution in this bug report. In the file Locker.pm (in my system located in /usr/share/perl5/Padre) the following function (line 102) should be changed:
sub db_increment {
my $self = shift;
unless ( $self->{db_depth}++ ) {
Padre::DB->begin;
# ...
Padre::DB->pragma( synchronous => 0 );
}
return;
}
to:
sub db_increment {
my $self = shift;
unless ( $self->{db_depth}++ ) {
#...
Padre::DB->pragma( synchronous => 0 );
Padre::DB->begin;
}
return;
}
i.e. changing the order of Padre::DB->pragma and Padre::DB->begin.
This allowed me to start padre as root (sudo), and to fix this I had to change the owner of the Padre configuration. I changed the rights to my user using chown:
sudo chown -R myuser:myuser /.local/share/.padre/
When I cap deploy my Symfony2 project, then log into my server I see that the the dev (app_dev.php) runs ok but the prod version (app.php) does not.
The error is
[Tue Jan 03 14:31:48 2012] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Failed to write cache file "/var/www/example/prod/releases/20120103202539/app/cache/prod/classes.php".' in /var/www/example/prod/releases/20120103202539/app/bootstrap.php.cache:1079\nStack trace:\n#0 /var/www/example/prod/releases/20120103202539/app/bootstrap.php.cache(1017): Symfony\\Component\\ClassLoader\\ClassCollectionLoader::writeCacheFile('/var/www/example/p...', '<?php ????name...')\n#1 /var/www/example/prod/releases/20120103202539/app/bootstrap.php.cache(682): Symfony\\Component\\ClassLoader\\ClassCollectionLoader::load(Array, '/var/www/example/p...', 'classes', false, false, '.php')\n#2 /var/www/example/prod/releases/20120103202539/web/app.php(10): Symfony\\Component\\HttpKernel\\Kernel->loadClassCache()\n#3 {main}\n thrown in /var/www/example/prod/releases/20120103202539/app/bootstrap.php.cache on line 1079
Looking at the recently deployed cache directory I see:
drwxrwxrwx 4 root root 4096 Jan 3 14:28 .
drwxrwxr-x 5 root root 4096 Jan 3 14:28 ..
drwxr-xr-x 6 www-data www-data 4096 Jan 3 14:28 dev
drwxrwxr-x 7 root root 4096 Jan 3 14:28 prod
I can fix the issue with chown -R www-data.www-data prod/ but I wondered if I can stop this from happening in the first place? And why do the directories have different owners?
This happens because your web-server is running by user, who is not able to write to just created cache/prod directory.
There are two solutions, which I know and use. First, add extra commands to run after deployment to Capfile. Capfile will like this:
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/bundles/*/*/recipes/*.rb'].each { |bundle| load(bundle) }
load Gem.find_files('symfony2.rb').last.to_s
after "deploy:finalize_update" do
run "sudo chown -R www-data:www-data #{latest_release}/#{cache_path}"
run "sudo chown -R www-data:www-data #{latest_release}/#{log_path}"
run "sudo chmod -R 777 #{latest_release}/#{cache_path}"
end
load 'app/config/deploy'
Second solution is more elegant. You specify correct user, who can write to cache in deploy.rb and make sure that you don't use sudo:
set :user, "anton"
set :use_sudo, false
In the last version of capifony, they've added the option to set writable directories.
Here's the official article which explains what I've written below : http://capifony.org/cookbook/set-permissions.html
You have to deploy using sudo (not a good practice, but it gets the job done)
set :use_sudo, false
# To prompt the sudo password
default_run_options[:pty] = true
and tell capifony which files to make cache and logs folder writable :
set :writable_dirs, ["app/cache", "app/logs"]
set :webserver_user, "www-data"
set :permission_method, :acl
(you have to install acl on your machine, or use :chwon instead of :acl)
EDIT :
I've just realized that this is not enough, the "set_permissions" task is not automatically called, so you have to explicitly run
cap deploy:set_permissions
Or add this line in your deploy.rb :
before "deploy:restart", "deploy:set_permissions"
I solved this problem by adding cache folder to shared folders.
set :shared_children, [app_path + "/cache", app_path + "/logs", web_path + "/uploads", "vendor"]
This way the directory is not recreated each time during deployment, so there is no problem with permissions.
Yes, don't need recreate cache every time after deploy, this solution is logical and pragmatical.
Second solution from Anton - is work if you cache folder permission true in develop environment