Nano Problems with History Files - nano

When I am editing a yml file with Nano I see this red error Problems with history file. Once I'm done I get the error below. I'm still learning linux and have a basic understanding of commands, but I followed the path /home/[my username]/.local/share and did not see a nano folder so I created one. It still does not work??? I'm assuming /home/[my username] is my root path when I do su to login to root?
root#debian:/home/docker# nano docker-compose.yml
Unable to create directory /root/.local/share/nano/: No such file or directory
It is required for saving/loading search history or cursor positions.

Related

How do I specify JRE when creating a Bamboo sidekick agent for their per-build-container plug-in?

Trying to get the sidekick image built and having some issues. Is there any documentation other than the README.md file?
My current problem is with getting the JRE requirement working but there are others. The page says "download Oracle JRE and place it inside the working directory. Optionally if you have a company wide distribution url, use that one at a later step." and the help says "Java (JRE) download url or path inside working directory". Have not been able to get this to work.
I went to the JRE link provided and was presented with options to download a rpm file or a tar.gz file. Which is expected (was unable to get either one working)?
It says to place the file in the "working directory" but not sure where exactly. Tried in sidekick folder and in sidekick/jre both without success no matter what I used after the -j command. Is this just the path or should the filename be included as well? Can I get an example?
I'm running this script using my login but noticed the output folder is being created with root user and group. I see no indication that this should be run with sudo. What is the correct way to run this script?
Using debug, I see the function "download if not cached". Can I save these files (JRE, Bamboo jar file, etc.) somewhere so I don't have to worry about downloading them? If so, where should they go? Looks like I might have a problem with the wget to d/l the jar file so would like to just be able to place all these in a folder and be done with it.
It looks like the major problem is the script didn't clean up after itself if it fails. The issue was the first time it failed then that caused subsequent issues as the output folder was already there. Removing this directory between each attempt help.
As for the correct syntax for the -j JRE option I manually downloaded the JRE and placed in a folder called per-build-container/sidekick/stuff/. For the command line it is not just the path but the file name as well (the tar.gz and not the RPM). For my case it was
-j stuff/jre-8u251-linux-x64.tar.gz
Note I also ran the script as sudo. Wasn't stated but seemed to work OK.
Another issue I ran into was the download of the agent jar file. There is a redirect in the wget file that was not working for us. I ended up editing the script and replacing the Altassian based url with the redirected one.
This addresses all the issues I ran into with the initial question.

Confused about how I execute a PhantomJS file. Beginner needing advice. [MacOS]

I'm currently trying to execute the hello.js example file in my Terminal but an completely failing to do so. The examples, I've found online either ask me to type:
phantomjs hello.js
my terminal returns
Can't open 'hello.js'
Or the absolute file path which for me is
/usr/local/Cellar/phantomjs/2.1.1/share/phantomjs/examples/hello.js
my terminal returns
-bash: /usr/local/Cellar/phantomjs/2.1.1/share/phantomjs/examples/hello.js: Permission denied
What am I doing wrong here? :(
Thanks in advance.
Screenshot
To run the file in Phantomjs, you either need to supply phantomjs with the full path to the file:
phantomjs /usr/local/Cellar/phantomjs/2.1.1/share/phantomjs/examples/hello.js
or you can make life a little easier on yourself by copying the examples directory to somewhere easy to access (e.g. your home directory)
cp -r /usr/local/Cellar/phantomjs/2.1.1/share/phantomjs/examples ~/
(~/ is a shortcut to your home directory; you could use the Finder to the examples directory to your home directory)
changing to that directory in Terminal
cd ~/examples
and then running
phantomjs hello.js

How to show root folders in file tree in cloud9 local ssh install

I've installed cloud9 locally on my remote sever following instructions from Cloud9's "sdkcore" repository on github.
I was able to activate it correctly.
However, once started, the files tree only shows Cloud9 folders, but if you want to edit a file contained in a /var/www/examplefolder directory, I cannot.
I could only modify through the ssh terminal, but I would like to be able to edit the files using the most convenient sublime editor.
How can i fix it?
Thanks.
update:
I resolved creating a link with the command :
sudo ln -s /path/from/folder/you/need /path/to/c9/workspace
in that way you will see your files in c9 workspace folder in the file tree bar;
or
sudo ln -s /path/from/folder/you/need /home/yourusername/
in that way you will see your files in favourites folder in the file tree bar.
If you want to do this, you'll need to create the SSH workspace with the workspace root as / . Alternately, you can open files in the IDE by using the c9 {filename} command.

Changing the html file for apache

I recently bought a domain and put a html and css file to apache by using ubuntu(I dont even remember the exact commands.)Anyway now I want to change them.I removed the css file with cd /var/www/html and writing sudo rm blabla.css .But I am not sure about writing rm index.html since I am not sure what will be the effects.Also for some reason I got some problems when I tried to move my other css and html files.How can I accomplish it
For all the commands mentioned here you can see their help pages ie their manuals on Ubuntu by using
man rm
man cp
man rsync
etc. This command
rm index.html
Will remove the file completely ie if you hit your domain
http://www.example.com/
you will likely get an error indicating no page or depending on how your server is setup it might list the directory contents. Normally when editing a personal website people copy the new files over the top of the old one ie using something like rsync/ftp etc.
For instance if you do this
cp foo.html index.html
the cp command will overwrite the index.html file with the contents of foo.html. If you use ftp it will do the same thing but this time if you edit index.html on machine A and ftp it to machine b it effectively does this
cp machineA/index.html machineB/index.html
This allows you to work on one machine and copy the changes to the other.

Joomla - Warning! Failed to move file error

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.