Linux find command Permision or Access Denied error message.

Excluding the  "permission denied" or "Access denied" message is quite simple.

When the find command is executed with lack of permissions, all the errors saying "permission denied"  are sent to the stderr.
There is a way of redirecting all this errors to the void. that's the /dev/null device.

example of a find execution:

find ./ -iname '*.jpg' -print 2> /dev/null

./2012/07/08/DSC_0113.JPG
./2012/07/08/DSC_0103.JPG
./2012/07/08/DSC_0124.JPG
./2012/07/08/DSC_0107.JPG
./2012/07/08/DSC_0115.JPG


And that's it ! ! !

here is the video of this exact example




No more permission-related errors.

This is a good practice if you are coding in linux using the find command for bash scripting or perhaps you want to create your own find GUI.

Thank you for stopping by.




[ S O L V E D ] - WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring pkcs11: No such file or directory


THIS FIX MAKES THE gnome-keyring-pkcs11.so LOAD AT STARTUP FOR THE LXDE SESSION


This is one of them, now fixed....Warning message, it's an error message cause it is not letting the command to run. "WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-<SOMEGENERATEDSTRING>/pkcs11: No such file or directory "This is caused because of a module: gnome-keyring-pkcs11.so that is not being loaded when you log into an LXDE session. (this problem is analog to other sessions too, in this case I am using LXDE but could be KDE, GNOME etc... see the solution to understand how).



Here is the FIX!!!:

add "LXDE;" (without the double quotes and plus the semicolon, didn't try without it) 
to this file "/etc/xdg/autostart/gnome-keyring-pkcs11.desktop"  by editing it with whatever text editor you preffer, I'll use "nano" 

1 - in a terminal type (as root or with sudo): nano /etc/xdg/autostart/gnome-keyring-pkcs11.desktop

[Desktop Entry]
Type=Application
Name=Certificate and Key Storage
Comment=GNOME Keyring: PKCS#11 Component
Exec=/usr/bin/gnome-keyring-daemon --start --components=pkcs11
OnlyShowIn=GNOME;Unity;LXDE;
X-GNOME-Autostart-Phase=Initialization
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=true
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-keyring
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.2.2
NoDisplay=true
X-Ubuntu-Gettext-Domain=gnome-keyring

2 - after editing, make sure you save the changes

3 - RESTART YOUR PC

CHEERS!
PLEASE PRESS THE LIKE BUTTON, THANK YOU A LOT!

2 ads