Table for linux user/group permission format .
The command “sudo chmod -R 777 /usr” ruined /usr/bin/sudo and /usr/bin/su
After ruined, when “sudo …” is executed, error occurs like
$ sudo sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
$ su Password: su: Authentication failure
According to the hints of error, this problem is solved by rebooting computer into a chroot mode, and execute following command
# chmod 4755 /usr/bin/sudo
# chown root:root /usr/bin/sudo # this makes ‘sudo’ owned by root (uid=0)
# chmod u+s /usr/bin/sudo # this set the ‘setuid’ bit, which is the third character in first triad
Explaination of setuid:
setuid and setgid (short for “set user ID upon execution” and “set group ID upon execution”, respectively) are Unix access rights flags that allow users to run anexecutable with the permissions of the executable’s owner or group respectively and to change behaviour in directories. They are often used to allow users on a computer system to run programs with temporarily elevated privileges in order to perform a specific task. While the assumed user id or group id privileges provided are not always elevated, at a minimum they are specific.
Although I check with commands in terminal
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
which shows version GLIBCXX_3.4.15 exists, MATLAB still repeats this error. After googling, I found that MATLAB searches the libraries firstly within its own library path /usr/local/MATLAB/R2012a/bin/glnxa64/ or /usr/local/MATLAB/R2012a/sys/os/glnxa64 and then the system library path. The build-in library is somehow out-of-date, and the version GLIBCXX_3.4.15 doesn’t exist in the old library.
I tried to rename the build-in library into another name so that MATLAB can be forced to find the correct one, but there still many other candidates library files with the same name which are prior in the searching order. I need to rename all these old libraries with the same name to help MATLAB direct to correct one, which would be troublesome.
Finally, I found an easy way to solve the problem by linking the correct library file with the MATLAB firstly searched old library file, i.e.,
sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 /usr/local/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6
After running this command in my terminal, the world calms down.
Very elegant proof!!
I enjoy basic beautiful mathematical proofs. I see them like small jewels, that I collect from time to time. In this spirit, this post proposes probabilistic proofs of a couple of basic results.
Jensen inequality. The Jensen inequality states that if X is an integrable random variable on Rn and φ:Rn→R a convex function such that φ(X) is integrable, then
To prove it, we start by using the convexity of φ, which gives, for every integer n≥1 and every sequence x1,…,xn in Rn,
Now, we use the integrability of X and φ(X): we take x1,x2,… random independent and distributed as X, we use the strong law of large numbers for both sides, the fact that φ is continuous for the left hand side, and the fact that if P(A)=P(B)=1 then A∩B≠∅. I also appreciate the proof based on the equality for affine functions, the variational expression of a convex function as the envelope of its tangent hyperplanes, together with the fact that the supremum of expectations is less than or equal to the expectation of the supremum. Read more…
This post is to help you remote linux server from Windows, especially with X11 display specified.
First step is installation of Cygwin including OpenSSH package.
Then, it is followed by installation of X-Win32.
No need to set any configuration to PuTTY in X-Win32, all you need are the following two commands in Cygwin with X-Win32 opened.
1) ssh -X -p [your port] [usrname]@[linux server address]
2) export DISPLAY=[host address]:0
Hope this would help you!
Repost from Ubuntu Blog.
You can install alien itself from the Ubuntu Universe repository by adding the repository to your list of sources and doing:
$sudo apt-get update
$sudo apt-get install alien
Installing the .rpm file
To install the .rpm file, you first need to convert it to a .deb file which can be installed on Ubuntu.
I assume that you downloaded the package to your Desktop (~/Desktop is the directory)
You can convert the .rpm to a .deb by using the following commands.
-This will change the directory to your desktop, where you have the .rpm file.
$sudo alien -k name-of-rpm-file.rpm
– This will convert the .rpm to a .deb.
– The “-k” will keep the version number. Otherwise alien adds a “1″ to the version number.
– Tip: Use Smart Tab Completion to avoid mistyping the file names
$sudo dpkg -i name-of-deb-file.deb
– This will install the .deb package
Try reading the alien manpage for more details on how to convert other kinds of packages and the options available.