When I open my project with PhpStorm on Ubuntu 18, and when I try to edit file, then pop up window appears "Clear Read-Only Status" with options Clear - Ok.
When I click to clear then again pop up window appears with text "Failed to change read-only status for the following files: ..."
I cant change permissions in my cloned repository (the one I am accessing through PhpStorm) on Ubuntu because then file permissions will be different than ones on online repository.
I can edit and write to files through cli with sudo nano ...
Solution to my problem:
Add user as owner of project folder:
sudo chown -R user project
Changing the owner of the folder solved my issue:
sudo chown -R system-name project-folder-location
Related
I'm getting an error in my self-hosted github runners:
rm: cannot remove '/home/user/github-actions/1/_work/project/project/.git/index': Permission denied
It's not just this one file, but all the files that it tries to delete.
If I run something like: sudo chmod -R 777 . in the home directory, it will temporarily fix it. But the issue will come back. What can I do to fix this permenantly?
When your runner fails with this error, double-check the output of:
ls -alrth /home/user/github-actions/1/_work/project/project/.git/index
ps -eaf|grep -i runner
That way, you can see:
who has created that file
what user is executing the current runner process
That allows you to confirm a user process issue (one executing the runner, the other the files).
I wonder if Git is running as a separate user or something
No, it should not.
I am trying to run my html file on port 8080 through command 'http-server' but the terminal keeps saying 'command not found'.
I have tried solving this through 'npx http-server' and 'npm install -g http-server' but then I'm told that the 'npx' and 'npm' commands cannot be found as well.
hello friends please make sure you install node js correctly and maybe this article could help
try node -v for check node is install or not
try npm -v for check npm is install or not
NOTE if you are using windows please make sure to add PATH
how to add PATH in windows
search 'Environment Variables' on global search
Choose “Edit system environment variables”.
Click “Environment Variables” in the “Advanced” tab.
In the “System Variables” box, search for Path and edit it to include the path C:\Program Files\nodejs. If you don’t see it there click “New” then add this path. (Note: Depending on your version you may just need to edit and append this path to what’s there by prefixing it with a semicolon. You’ll see the other paths there are also separated by semicolons).
If you are using linux it could be the permission issues
sudo chown -R $(whoami):admin /usr/local/lib/node_modules/
https://linuxhint.com/npm-command-not-found/
I have MySQL set up correctly on my linux computer, however I want a better way to input data into the database besides terminal. For this reason, I downloaded phpMyAdmin. However, when I try to log in to the phpMyAdmin from index.php, it doesnt do anything. It seems to just refresh the page without doing anything. I am putting in the correct MySQL username and password. What is the issue?
Here is a screen shot of what it shows after I click "go".
This is a possible issue when the path to save php_session is not correctly set :
The directory for storing session does not exists or php do not have sufficient rights to write to it.
To define the php_session directory simply add the following line to the php.ini :
session.save_path="/tmp/php_session/"
And give write rights to the http server.
usually, the http server run as user daemon in group daemon. If it is the case, the following commands will make it :
chown -R :daemon /tmp/php_session
chmod -R g+wr /tmp/php_session
service httpd restart
Login fails if session folder in not writeable. To check that, create a PHP file in your web directory with:
<?php
$sessionPath = 'undefined';
if (!($sessionPath = ini_get('session.save_path'))) {
$sessionPath = isset($_ENV['TMP']) ? $_ENV['TMP'] : sys_get_temp_dir();
}
if (!is_writeable($sessionPath)) {
echo 'Session directory "'. $sessionPath . '"" is not writeable';
} else {
echo 'Session directory: "' . $sessionPath . '" is writeable';
}
If session folder is not writeable do either
sudo setfacl -R -m u:www-data:rwx <session directory> or chmod 777 sudo setfacl -R -m u:www-data:rwx <session directory>
-
I am late to the game, but on Amazon linux AMI I could not log in to phpmyadmin ... it just kept refreshing the login screen with no errors.
I have fixed with below command
sudo chmod -R 755 /var/lib/php/session
I fixed my issue on CentOS 7 with MariaDB and phpmyadmin I downloaded from offical phpmyadmin site by adding
session.save_path = "/var/lib/php/session"
to /etc/php.ini
and
chown -R :lighttpd /var/lib/php/session
I also restarted php-fpm and lighttpd after
In my case the solution was to set an Apache setting properly:
ProxyPassReverseCookiePath
This was required, because ProxyPass and ProxyPassReverse were in use, but cookie paths are not changed automatically.
It'd be great if PHPMyAdmin had shown something like session not found or anything, when password is sent with POST.
Do you have a .htaccess file in one of the parent directories that strips off index.php from the url by doing a 301 redirect?
301 redirects discard the form data and redirect you as if you didn't submit anything. So you get returned to the login page.
So you should create a local .htaccess file in the phpmyadmin directory with a single line RewriteEngine On. This will overwrite the previous rewrite rule to nothing.
You may need to clear the browser cache as Chrome aggressively caches 301 redirects.
In my case the hard drive was full.
Use df -h to check the space left on your hard drive, and if you want you can free some space by using the command sudo apt-get clean, which removes installation files.
I hope this will help some future users.
I ran these commands and it worked for me:
sudo service httpd restart
sudo service mysqld stop
sudo service mysqld start
Try searching the web for installation or setup guides for phpMyAdmin. Look at two or three of these and make sure you have covered all the required steps. (If you have already done so, please include which guides you have followed it in the question).
See if it helps to edit config.inc.php (acecoder mentioned this as well).
Check if this guide is of any help.
Which distro are you on? Try searching for the name of the distro you are using together with "phpMyAdmin guide" or "phpMyAdmin setup howto".
If you encounter errors along the way, post the error text here, if it's short (or paste via a pastebin-like site if it's long).
Are you sure that mysql is running? I had the same issue after doing a database import and filling up the volume containing the mysql database. After changing various permissions and clearing sessions, I tried to restart mysql (/etc/init.d/mysql restart) and it failed because the volume was full. After increasing /var and starting mysql successfully, I was able to log into phpmyadmin just fine.
If you have an error like:
Host 'host_name' is blocked because of many connection errors.
Login in your mysql as root and run the flush hosts command
1.- mysql -u root -p
2.- mysql > flush hosts
After this I was able to login again in phpmyadmin
phpMyAdmin will show errors when login fails. If it doesn't, it means that your setup has an error.
The most likely place to check is your php.ini settings. Since there doesn't seem to be an official list of phpMyAdmin-compatible settings, it's mostly trial and error.
Make sure you have enabled the stuff that needs to be enabled. Also check that you did not enable uncommon php.ini settings (like enable_post_data_reading = Off) because phpMyAdmin assumes them to be "the usual ones".
To ease debugging, start with a clean default php.ini file then tweak them line by line to see which setting is causing the error. (Don't forget that you need to restart your server after changing the php.ini file for the changes to take place.)
In my case it was due to an old Apache session.
Stop Apache, clear all pending sessions in your sessions.save_path directory (example: /var/lib/php/session) and restart Apache.
Make sure to set a 32 chars long random key in 'config.inc.php' in the $cfg['blowfish_secret'] value. That solved it for me.
Didn't realize I need to restart MariaDB after modifying config.inc.php:
service mariadb restart
Otherwise at least in my case changes didn't come affect. Also make sure your php session directory is writable by webserver (typically session.save_path = "/var/lib/php/session")
Getting this error in sublime text, wondering what to do about it. Is there a way to completely uninstall any related files to ST2? I tried uninstalling it and re-installing it, but this error still persists. I imagine there are some temp files, or cached files that I need to remove, is there a way to clear those out?
Unable to run package setup:
Traceback (most recent call last):
File "/usr/lib/sublime-text-2/PackageSetup.py", line 165, in upgrade
upgradePackage(pkg, pristinedir, datadir, backupdir)
File "/usr/lib/sublime-text-2/PackageSetup.py", line 158, in upgradePackage
os.path.join(backupdir, base), inhibitOverwrite)
File "/usr/lib/sublime-text-2/PackageSetup.py", line 90, in upgradeArchive
writeFile(fname, newar.read(f))
File ".\zipfile.py", line 834, in read
File ".\zipfile.py", line 857, in open
File ".\zipfile.py", line 824, in getinfo
KeyError: "There is no item named u'nathos-sass-textmate-bundle-0e46064/Snippets/expression(\\u2026).tmSnippet' in the archive"
execute
sudo sublime
for the first time
On Ubuntu:
I tried Achu solution but it didn't work. My Sublime Text 2 started working after I changed the files owner to my user. You have to open Terminal (ctrl+alt+t) and type:
sudo chown -R [your user name here] /home/[your user name here]/.config/sublime-text-2/
So, for example, if your user is "john" you have to type:
sudo chown -R john /home/john/.config/sublime-text-2/
Hope this helps.
Similar to Victor's answer, but more specific, I deleted the single file C:\Users\(Username)\AppData\Roaming\Sublime Text 2\ Installed Packages\Sass.sublime-package and then Sublime Text 2 started up fine.
On Ubuntu:-
I found this is a permission issue. Just change the permission to 777
sudo chmod 777 -R /home/user/.config/sublime-text-2/Packages/[package name]
The last line says:
KeyError: "There is no item named u'nathos-sass-textmate-bundle-0e46064/Snippets/expression(\\u2026).tmSnippet' in the archive"
So search for that object recursively in files in the sublime text user data directory:
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
grep -r nathos-sass-textmate-bundle-d6d079e *
#Result# Binary file Installed Packages/Sass.sublime-package matches
Then delete the offending file:
rm -rf Installed\ Packages/Sass.sublime-package
I deleted some erronous packages which solved my problem. Steps to do it here: http://untroubler.com/questions/8-sublime-text-2-and-unable-to-run-package-setup
Update after comment below:
This is due to a corrupt install of a package. On OSX, goto:
/Users/YOU_USER_NAME/Library/Application Support/Sublime Text 2/Installed Packages/.
Remove the package you tried to install and it should work again.
I managed to find all related files to this bundle and deleted them manually. I've noticed that if I miss a package from somewhere ST2 recreates some folders based on packages related to it, so it's not enough to delete some folders, you have to really find all related data and delete it.
sudo sublime-text
This works for me.
Simply reverting Sublime Text to a freshly installed state resolved this issue.
Sublime Text 2 can be reverted to a freshly installed state by removing your data folder. Depending on your operating system, this folder is located:
OS X: ~/Library/Application Support/Sublime Text 2
Windows: %APPDATA%\Sublime Text 2
Linux: ~/.config/sublime-text-2
To revert to a frestly installed state on Ubuntu 13.10, you can:
Exit Sublime Text 2
Delete (or move) the data folder, so running sudo rm -rf
~/.config/sublime-text-2
Start Sublime Text 2
Hope this helps.
There's already an answer related to permissions for Linux, but I found the issue was related to permissions for a Windows install. I placed the install for portable files into "Program Files/SublimeText2" - apparently when I run ST2 it needs additional permissions which it wasn't getting.
So I installed ST2 portable to a folder in a user directory (e.g. A folder my user created and maintains - C:\dev\SublimeText2) and everything works fine now.
I am trying to add a path so I don't have to keep typing usr/local/mysql/bin every time I want to start Mysql. I found instructions here that say:
Edit the file /etc/profile and update the path by adding:
usr/local/mysql/bin/, for example:
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin"
Problems:
1. There is no existing line in my profile file that says 'path'. This is what it currently says in profile:
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval '/usr/libexec/path_helper -s'
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
2. I really have no idea what I'm doing on a mac (yet). What do I add/change to the above file so mysql is easier to access?
It depends on whether or not you want all user accounts to have access to MySQL, or just you.
For everyone, edit /etc/profile as instructed and add the following to the end:
export PATH=$PATH:usr/local/mysql/bin
For just you (ALSO, this is safest so you don't accidentally mess up any system variables!):
Get a terminal session: Launch Terminal if it's not already running.
Make sure you're in your home directory:
CD ~
See if .bash_profile exists:
ls -al .b*
If it does, open it with your favorite text editor. If it doesn't, launch your favorite text editor and Save as... .bash_profile in your home folder.
Add this line to .bash_profile and Save:
export PATH=$PATH:/usr/local/mysql/bin
Then close Terminal and open again for the change to take effect.
Hope this works out for you.