git add failing because of .DS_STORE file - git-add

I removed a .DS_STORE file from my local repo then I ran git add ., and I have this message :
fatal: unable to stat '.DS_Store': No such file or directory
How can I manage this ?

Related

Failed to open temporary output file: Permission denied

ubuntu 20.04 install azeronthcore with docker,run ./acore.sh docker build , i had tried
several times but still not working.anyone could help me with this?thx!
root#ubuntu:~/azerothcore-wotlk#
dos2unix: Failed to open temporary output file: Permission denied
dos2unix: problems converting file env/dist/etc/authserver.conf.dockerdist to file
env/dist/etc/authserver.conf.dockerdist
dos2unix: Failed to open temporary output file: Permission denied
dos2unix: problems converting file env/dist/etc/worldserver.conf.dockerdist to file
env/dist/etc/worldserver.conf.dockerdist
Make sure you have permission to create a file in directory env/dist/etc/. dos2unix writes the result first to a temporary file. When something goes wrong in the middle, you still have the original file.

Issues with moving WordPress folder to var/www/html (before/after)

I am trying to install WordPress on my virtual machine following the official guide at here
Somehow I could not move my wordpress file to the respective folder var/www/html.
The following error are given.
cp: cannot stat ‘~r’: No such file or directory
cp: cannot create regular file ‘/var/www/html/index.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/license.txt’: Permission denied
cp: cannot create regular file ‘/var/www/html/readme.html’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-activate.php’: Permission denied
cp: omitting directory ‘/home/caleb/wordpress/wp-admin’
cp: cannot create regular file ‘/var/www/html/wp-blog-header.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-comments-post.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-config.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-config.php~’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-config-sample.php’: Permission denied
cp: omitting directory ‘/home/caleb/wordpress/wp-content’
cp: cannot create regular file ‘/var/www/html/wp-cron.php’: Permission denied
cp: omitting directory ‘/home/caleb/wordpress/wp-includes’
cp: cannot create regular file ‘/var/www/html/wp-links-opml.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-load.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-login.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-mail.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-settings.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-signup.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-trackback.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/xmlrpc.php’: Permission denied
So after checking the location, I found that I don't have a var/www/html folder due to me removing apache2 previously in a LEMP installation guide.
So I tried to reinstall apache via
sudo apt-get install apache2
After installing, I found that the var/www/html is now available. But still I could not copy the files into the respective folder without using sudo, which is not mentioned in the guide. After copying the files into the var/www/html directory, I am supposed to access my IP address to continue with WordPress installation. Which I failed as well, as the browser directed me to Nginx just like in the LEMP guide instead of WordPress installation page in the WordPress guide. Any idea?
Edit: Tried stopping Nginx service and it does not work. (Does not redirect me to WordPress page)
TL/DR: WordPress folder does not move to var/www/html like how the guide did, and after using sudo to move the folder, localhost does not go to WordPress installation page.
You should have to use sudo to move anything into /var/www/html/.
Use mv not cp
sudo mv /example.com /var/www/html/

why can't I acces symfony after installation ? Here's the message I get : "-bash: symfony: command not found"

I'm discovering symfony and on a way to develop a web app. I just installed it (a couple of days now) but yet I can't have access to it through my terminal. It shows command not found is the principal message I get when I try. checked php and composer, they are all ok. But still don't have access to symfony.
Tried using this code
"hardpro$ mv /usr/hardpro/bin/composer.phar /usr/hardpro/bin/composer" to change the directory but yet, nothing.
ESOservices:~ hardpro$ documents/symfony
-bash: documents/symfony: No such file or directory
ESOservices:~ hardpro$ documents/symfony new
-bash: documents/symfony: No such file or directory
ESOservices:~ hardpro$ cd esoServices
-bash: cd: esoServices: No such file or directory
ESOservices:~ hardpro$ cd symfony
-bash: cd: symfony: No such file or directory
ESOservices:~ hardpro$ symfony new --full my_project
-bash: symfony: command not found
ESOservices:~ hardpro$ mv /usr/local/bin/composer.phar /usr/local/bin/composer
mv: rename /usr/local/bin/composer.phar to /usr/local/bin/composer: No such file or directory
ESOservices:~ hardpro$ mv /usr/hardpro/bin/composer.phar /usr/hardpro/bin/composer
mv: rename /usr/hardpro/bin/composer.phar to /usr/hardpro/bin/composer: No such file or directory
You might need to define the PATH. Run this command before you want to run the symfony command.
export PATH="$HOME/.symfony/bin:$PATH"
Then you should be able to run a command like symfony server:start, but you would need to run the export every time you reopen your terminal.
To solve it permanently, you would need to add this command to your bash profile.
It seems like you have an error with your installation, you should install it again.
To install symfony : https://symfony.com/download
To install composer : https://getcomposer.org/download
To use it globally : https://getcomposer.org/doc/00-intro.md#globally
You have to run the command mv composer.phar /usr/local/bin/composer in the same folder where you run the install composer commands.

problems with sudo mv file /non_existing_folder - file disappeared

I was trying to move a RubyOnRails.txt file into a /RUBY directory, so for some reason I typed:
mv RubyOnRails.txt /Ruby"
And I got this error: mv: cannot move ‘Untitled Document’ to ‘/Ruby’: Permission denied
Obviously, I typed: sudo mv RubyOnRails.txt /Ruby
And then, I understood my error, the folder wasn't /Ruby, was /RUBY.
Now the file is gone, and I can't find it anywhere.
There is some way to find it or recover it?
The file isn't gone, it's just renamed to Ruby and it's in root directory of your system /
You can still move it where you want like that sudo mv /Ruby your_destination

Error from 7z cannot open <file>.tmp Permission denied

I have an archiving script that uses 7z -tzip -aoa and it runs on unix and works fine. But when run through Autosys, it always fails when trying to archive a second file to an existing archive. The error is:
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=C,Utf16=off,HugeFiles=on,8 CPUs)
Scanning
Updating archive
20150807.zip
Error:
7-Zip cannot open file
20150807.zip.tmp
Permission denied
It doesn't tell me where it's having permissions with that tmp file, so I don't know where to look. I've set all the permissions to any folders that I thought it might be using to 777, but the problem persists. It works great when not using Autosys.
I found the comment below but it seems to be relevant only to Windows. I'd like to know how I can make this work on UNIX.
I tried to search for a while on the net, but couldn't find any help, so here I am.
My first problem is when I try to compress a folder in C:// with the context menus (7-zip > Add to "xyz.zip"), I get the error : "Access is denied. 7-zip cannot open file "xyz.zip.tmp"
I can however open the file manager in the 7-zip folder ("7zFM"), run as administrator and compress the said file to .zip.
It seems to be a security issue about C:// directory, since it seems that I can compress other files and folders just fine.
Any help?
Link
Shell
Shell
2012-07-29
You have guessed right. You can either 1) run 7-Zip as administrator or 2) set the working directory in 7-Zip File Manager (Tools->Options->Folders) to an unprotected one (for example, clear the checkbox there) and use the "Add to archive…" menu and create the archive in an unprotected directory.
Set the working directory using the -w switch.
7z does not use current directory (the one you get by pwd) as a working directory. It uses the one that the resulting archive is going to be created at.
For example:
/tmp $ 7z a /folder.7z /folder
will ignore the fact you're in /tmp and will first create a tmp file in / and then put the result in the / no matter what you current folder is.
If you don't have access to create files in / but you do have access to update the archive that's already there (a very valid scenario) you're going to get exactly what you get:
/tmp $ 7z a /folder.7z /folder
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.utf8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i7-7500U CPU # 2.70GHz (806E9),ASM,AES-NI)
Open archive: /folder.7z
--
Path = /folder.7z
Type = 7z
Physical Size = 150
Headers Size = 150
Solid = -
Blocks = 0
Scanning the drive:
1 folder, 2 files, 0 bytes
Updating archive: /folder.7z
Items to compress: 3
Error:
cannot open file
/folder.7z.tmp
Permission denied
System ERROR:
Unknown error -2147024883
Also, in case you're omitting the archive name from the command line, it's going to use directory of your source.
For example, when you do this:
7z a /folder
it is going to use / as a working directory - it will attempt to create temp file in / and will put the resulting archive there as well.
To fix that just make sure that the archive name is in your command line and that you have file create permission to the folder the archive is going to be created (sometimes you have access to update the archive itself but can't create new files in the dame folder)

Resources