I have a scala application that needs to perform sys.process operations with sudo and these operations are failing for me. From my google searching, it appears that I may be able to resolve this by running intellij with sudo. However, when I do this, I'm prompted to import settings and need would need to re-import my project. This seems less than ideal. Is there a way to set up a run configuration in intellij to have sudo privileges or at least run idea.sh with sudo but use my original workspace, so that all changes and configurations are shared between the sudo and non-sudo profiles?
Presumably this is down to Intellij reading its settings from a directory under the current user directory, eg C:\Users\matt.IntelliJIdea13 on my Windows PC. When you sudo, it will try and read its setting from a different directory.
I would check with directory it is trying to save its config to when you run it with sudo. Then set up a soft link from this directory back to your normal user directory. IntelliJ should then read the same set of files whether or not you are using sudo.
eg ln -s /home/matt/.IntellijIdea13 /home/root/.IntelliJIdea13
I haven't got IntelliJ installed on Linux so can't check this.
Related
I want to start intelliJ from Toolbox and manage it from there but need intelliJ to run as sudo. Does anyne know if it's possible?
Edit:
I need this because on my local machine my application cannot create folders for which normally root is needed - saving logs to specific folder in system.
Compared to run JetBrains App from Toolbox with root, it's easier for you to change that specific folder non-root user writable, with something like
sudo chown <user> <folder>
However, this may cause some security problem if that specific folder is somewhere system wide related, for example inside /usr/bin/, so it's better not to do so. But if you really need that, you may try to gain sudo privilege for example use gksudo while running your application.
Friends, I tried to deploy my yii production application from cloud9 IDE to OpenShift while do so, I got this error message,
CException
Application runtime path "/var/lib/openshift/51dd48794382ecfd530001e8/app-root/runtime/repo/php/protected/runtime" is not valid. Please make sure it is a directory writable by the Web server process.
Even when I changed folder permissions to 775 (chmod -R 775 directory) on Cloud9 IDE and deployed again, but I get the same error coming.
It's an old question, but I just bumped into the same issue very recently.
When you extracted the "yii" package several folders were empty, "framework/protected/runtime" was one of them.
To deploy to OpenShift you need to commit the yii package to git, and the push the commit to OS. But, git won't commit empty folders, so they are not created in your deployment. You need to create some file inside those folders and add those files to your git repo before committing/pushing. The usual procedure would be to add a ".gitkeep" file to those folders (it's just a empty dummy file, so git would see those folders).
That would fix this particular error.
It may be due the ownership given to the folder.
Check the web server user group, is that directory is writable or not and also What effects a web server when we change the platform.
Hope my suggestion would be useful.
For Yii applications, the assets and protected/runtime folders are special. First, both folders must exist and writable by the server (httpd) process. Second, these two folders contains temporary files, and should be ignored by git. If these temporary files got committed, deployment in plain servers (not Openshift servers) would cause git merge conflicts. So I put these two folders in .gitignore :
php/assets/
php/protected/runtime/
In my deployment, I add a shell script to be called by openshift, creating both folders under $OPENSHIFT_DATA_DIR and creating symbolic link to both of them in the application's folders. This is the content of the shell script (.openshift/action_hooks/deploy) which I adapted from here :
#!/bin/bash
if [ ! -d $OPENSHIFT_DATA_DIR/runtime ]; then
mkdir $OPENSHIFT_DATA_DIR/runtime
fi
# remove symlink if already exists, fix problem when with gears > 1 and nodes > 1
rm $OPENSHIFT_REPO_DIR/php/protected/runtime
ln -sf $OPENSHIFT_DATA_DIR/runtime $OPENSHIFT_REPO_DIR/php/protected/runtime
if [ ! -d $OPENSHIFT_DATA_DIR/assets ]; then
mkdir $OPENSHIFT_DATA_DIR/assets
fi
rm $OPENSHIFT_REPO_DIR/php/assets
ln -sf $OPENSHIFT_DATA_DIR/assets $OPENSHIFT_REPO_DIR/php/assets
The shell script ensures the temporary folders created on each gear after openshift deployment. By default, a new directory's right are u+rwx, and it became writable by the httpd process because the gear runs httpd as the gear user (not apache or something else).
I successfully installed subversion on my server. When I run the command:
which svn
I get the response:
/usr/bin/svn
I create a repository inside my root directory which is my httpdocs folder with the following command:
svnadmin create ~/svn
I successfully created the following files and folders and configured them and I see the following files and directories inside the svn directory:
conf db format hooks locks README.txt
But I cannot create trunk, branch, and tag directories. In fact I cannot create directories period. Here is the command I have been using:
svn mkdir file:///httpdocs/svn/site
When I make this command the message I get is the following:
svn: Could not use external editor to fetch log message; consider setting the
$SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no
'editor-cmd' run-time configuration option was found
Also When I type in url:
http://mydomain.com/svn
I get the follwoing message:
404 - Not Found
What do I need to do to configure my repository, check to see if my repository is actually working. Oh and I did run the following command:
svnserve -d
I create a repository inside my root directory which is my httpdocs folder with the following command...
That's not how you get Subversion to work with Apache httpd if that's what you're trying to do. You need the mod_dav and mod_dav_svn modules for Apache. You might have to recompile Apache to get these.
Once you get mod_dav and mod_dav_svn installed, you need to configure your httpd.conf file (or put a configuration file under your httpd's conf.d depending how it's configured on your system) for it to work.
In the end, it's not all that difficult. Most Apache installations have mod_dav and mod_dav_svn added in, and you can see if your http.conf file is configured correctly. The on line Subversion manual will have everything you need to get it working.
svn: Could not use external editor to fetch log message; consider setting the
$SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no
'editor-cmd' run-time configuration option was found
Read the message. It says Could not use external editor because you didn't specify one. Again the Subversion on line manual explains it in detail.
Basically, when you commit a change in Subversion, you need to create a commit message. This can be done in two ways:
You use the -m option like svn commit -m "This is my commit message".
You set the variables SVN_EDITOR, VISUAL, or EDITOR to the name of the program you want to use. For example, in Windows, you'd say C:> set EDITOR=notepad.exe. On Unix, you'd say something like $ export EDITOR=vi. Subversion first checks the value of the SVN_EDITOR variable, then VISUAL, then EDITOR. If none of them are set, it gives you the error you saw.
Why did you get it on the svn mkdir command?
Because you use the URL form of the command, it will make the directory, then commit the change, thus the need for a commit message. This should work:
svn mkdir -m"Adding the site directory to my repository" file:///httpdocs/svn/site
Now, you need to move your repository out of your HTTPDOCs directory. That's a very bad thing to have because it hurts your web server.
If you don't want to use the file:// protocol, you can use svnserve. This is a built-in Subversion repository server and uses the svn:// protocol. Observe:
$ svnadmin create my_repos #Creates the repository
$ vi my_repos/conf/svnserve.conf #See footnote 1 below
$ vi my_repos/conf/passwd #See footnote 1 below
$ svnserve -r my_repos -d
$ svn mkdir -m "Making basic directory layout svn://localhost/trunk \
> svn://localhost/tags svn://localhost/branches
$ export SVN_EDITOR="vi"
Your repository also becomes accessible to all the machines on your network too. Using svnserve is much simpler than Apache httpd, but there are a few issues:
You can't run multiple instances of svnserve since it wants to use port 3690 and it doesn't like to share. With Apache httpd, you can have multiple repositories.
Security setup with svnserve is limited. With Apache, I can use Windows Active directory or LDAP or I can configure it manually.
Some web based subversion repository browsers don't like svnserve.
By the way, if you haven't, go through the Subversion on line manual. It's one of the best manuals I've seen for any open source project.
1 When you setup your repository using svnserve, you need to edit the svnserve.conf file by enabling the line password-db = passed which is about line #20 in the file. Then you have to edit the passed file (located in the same directory) to configure the users and their passwords. Both are very straight forward, but easy to forget, and if you don't do it, you can't commit anything into your repository.
when you need to trunk branches and tags than you have to need the download import_dirs.copy
than after than cd /location/import_dirs.copy than run than command
cd /data/svn/import_dirs.copy/
svn import file:///location of repos/reposname/ -m "inital message"
this is the example of it.....
cd /home/raj/import_dirs.copy/
svn import file:///srv/svn/nmg/ -m "inital message"
than trunk branches and tags have been done
I have found some solutions to this error and tried implementing them but none of which has worked and hope that some here at SO might have a different answer.
I get this error, "Warning! Failed to move file" when I try install modules into my new installation of Joomla here:
http://sun-eng.sixfoot.co.za
Here's some solutions I have tried to no avail:
http://forum.joomla.org/viewtopic.php?f=199&t=223206
http://www.saibharadwaj.com/blog/2008/03/warning-failed-to-move-file-joomla-10x-joomla-15x/
Anyone know of another solution to this please?
Thanks!
Go to Help -> System Info in your administrator backend and check your Directory Permissions tab to make sure everything is writable.
Also make sure your Path to Temp Folder is correct in Site -> Global Configuration.
Finally, check to make sure that the module isn't already installed. It's possible that some files already got copied or something and now your system is having problems overwriting them.
If none of this works, let us know if the error message specifies which file can't be moved. That would help figure out a solution.
In the configuration folder change the temporal folder location to /tmp (public $tmp_path = '/tmp';) or create your own temperate folder and set it to /myowntemp and change the file permission to 777. you are good to go .
This is typically a file permissions issue. If the system cannot write to the tmp directory within Joomla it will give you the "Warning Failed To Move File" error.
The typical solution is to make the directory wide-open, in general a bad practice but a quick fix. You log in to the Linux command line via a terminal (telnet or ssh) session and set the permissions of the directory.
# chmod -R 777 ./tmp
The better option is to find out what user/group the Apache server is running as and assign the permissions accordingly. For example, if Apache is running your site as the myuser:nobody user:group then you can open up write permissions for the group by changing ownership of the tmp folder and making it writable by anyone in the group:
# chgrp -R nobody ./tmp
# chmod -R 775 ./tmp
Security can be a pain to get set correctly if you don't know *nix commands and security settings, so most people just blast a huge hole in the security with chmod 777.
The next thing you'll probably run into is another error message about not being able to update a specific directory. Again, this is a permissions issue and is typically a piece of the file being unzipped into the administrator subdirectory. Depending on whether your installing a component, a module, or a complex plugin with multiple pieces you may need to open up one or more of these directories using the same approach as above. Here is the "blow a big open hole in security" method:
# chmod -R 777 ./administrator/
Or more selectively:
# chmod -R 777 ./administrator/components/
# chmod -R 777 ./administrator/modules/
If you are a linux user then it is very simple to solve. Just type the following command and try again to install plugin/entension.
sudo chmod -R 777 /var/www/html/my_joomla_folder
You can also refer this link for brief information regarding permission of each folder and file.
Cheers!!
In Joomla 3.x you should go to System->System Information to see directory permissions
If one or more directories that are listed are not "writable" then you should change the permission of those directories:
If you are using one of Linux distributions you can use this command
to give the directories read/write/execute permission:
sudo chmod 777 -R address_of_lampp_directory/lampp/htdocs/joomla_directory
I have had a similar issue today and found is was the permissions set on the 'temp folder'. To resolve I changed them to 777 and my plugin installs worked fine!!
Another thing to check is whether you actually have space on the disk. I had this error and discovered that the drive was 100% full. Removing some unused files fixed the problem.
One other thing to try if everything else is not working is to add the following to your .htaccess file:
php_value upload_max_filesize 10M
Make sure 10M covers the size of the file you are uploading - increase it if your file is 12Mb, for instance.
[Source]
This issue was solved like this.
On the configuration.php file change the tmp_path variable according to:
if you site is mysite.azurewebsites.net, the path should looks like
'C:\DWASFiles\Sites\mysite\VirtualDirectory0\site\wwwroot\tmp'
instead of
'C:\DWASFiles\Sites\mysite.azurewebsites.net\VirtualDirectory0\site\wwwroot\tmp'
Refer to the link: http://social.msdn.microsoft.com/Forums/en-US/windowsazurewebsitespreview/thread/2701eadc-9977-46ab-9c56-81a2234bdce4
I did it and every is working for every error problem with OSX, I use OSX version 10.9.2 and get many problems. The way to fix every error is
# cd /Applications
# chmod -R 777 ./XAMPP
some files might not change permission but the problem is gone.
you can create folder and upload fine and picture, including install plugin.
When I am in my dept's server, I cannot use commands such as "apt-get install nethack". I have to build the nethack from Binary files to get it working, at least so I have been told. I cannot understand the reason. Why do I need to build things from binaries? Why is the use of the commands, such as "apt-get", forbidden? Why do I not need Root access to build from binaries?
apt-get is a system-level command that installs packages for all users.
If you download and compile, you are only creating local "copies" of the binaries, not system-wide. If you tried to complete the install process with make install this would most likely fail because you do not have sufficient privileges to install the program for all users' access (same reason you can't run apt-get install)
When you compile a program from source, you can give it the '--prefix=~/'. This causes it to install relative to your own home directory (so binary programs typically end up in '~/bin', man pages in '~/man' etc). This poses no problems because you already have permission to write here.
Apt-get on the other hand installs the packages in the global filesystem ('/bin/', '/usr/bin/', etc), which can impact other users and so, quite rightly, require administrative access.
If you want to install some program you can use the command
apt-get source app-name
This will work even if you are not root since it only fetch the source code to the app-name and put it in the current directory, which is easier than having to track down the source and there is a better chance to get it work, since you download the version that should work on your system.
Alternatively you should bug your sysadmin to install the programs you need, since it is his job (and if you need them, chances are that the rest of your team does too).
Because apt-get will install a program system wide.
The locations to which apt-get writes installed files (/bin, /usr/bin, ...) are restricted to root access. I imagine that when you build from source you're not executing the install step of the bulid. You're going to need to set a prefix for the installation such that the packages end up somewhere you can write. This thread talks a bit about setting prefixes for apt-get and you'll probably want to set your prefix to something like
~/software/
and then add the resulting bin directories to your PATH.