Open file via SSH and Sudo with Emacs

As of Emacs 24.3, an analog of the old multi: syntax has been layered on top of the modern tramp-default-proxies-alist approach, meaning that you can once again perform multi-hops without any prior configuration. For details, see: C-hig (tramp)Ad-hoc multi-hops RET With the new syntax, each ‘hop’ is separated by |. The example in the manual … Read more

www-data permissions?

sudo chown -R yourname:www-data cake then sudo chmod -R g+s cake First command changes owner and group. Second command adds s attribute which will keep new files and directories within cake having the same group permissions.

Getting “Permission Denied” when running pip as root on my Mac

Use a virtual environment: $ virtualenv myenv .. some output .. $ source myenv/bin/activate (myenv) $ pip install what-i-want You only use sudo or elevated permissions when you want to install stuff for the global, system-wide Python installation. It is best to use a virtual environment which isolates packages for you. That way you can … Read more

Connect to mysql server without sudo

Only the root user needs sudo requirement to login to mysql. I resolved this by creating a new user and granting access to the required databases: CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’; GRANT ALL PRIVILEGES ON database_name.* TO ‘newuser’@’localhost’; now newuser can login without sudo requirement: mysql -u newuser -p

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)