encfs does not mount folder - file

I have installed encfs to encrypt my directory and files and everything worked well when I installed encfs and configured it. I created two folders, one /XDM/game and second /Private and as encfs works I have to copy my files into /Private folder and this will sync all those files' encrypted version with /XDM/game. But when I restart my pc I have to remount /Private folder for that I am using the following command -
encfs ~/XDM/game ~/Private
But it returns me this error -
encfs ~/XDM/game* ~/Private
EncFS Password:
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
fuse failed. Common problems:
- fuse kernel module not installed (modprobe fuse)
- invalid options -- see usage message
help me with this error please. Thank you in Advance!!!

Short answer is 'In order to mount the directory you need to remove file from /Private folder and try mounting again with
encfs `~/XDM/game ~/Private`'
And long answer, after you configured encfs once you restart computer, you can see your folder /Private empty and to show the files you have to mount folder but if you copy any file in /Private folder and then try to mount then it will give you this error. So first delete the file you pasted/created after you restarted computer and then mount. It should work!
I have written a detailed article to help you understand better.
http://www.linuxandubuntu.com/home/how-to-encrypt-cloud-storage-files-folders-in-linux

I was stuck in a similar scenario once when accidentally trying to write to the encrypted directory. Solved it by doing
encfs -o nonempty <encryptedDirPath> <decryptedDirMountPoint>
There are some repercussions to using the 'nonempty' option though. More here.
If you are not able to unmount the decrypted directory after doing the above, you might need to delete the entry for your stash from Gnome Encfs Manager, in case you are using it.

I was having the same problem where it says that mountpoint is busy or not empty. so, I created another dir. in your case, you can do mkdir ~/Private2. and then, simply treat this as your new mountpoint.
encfs ~/XDM/game ~/Private2.

Related

Unable to move to cache, unable to move cache folder, unable to create cache

I am using VS code to open my react projects. Neither the folder from the git repository nor the locally stowed projects are accessible.
[13512:1219/213241.168:ERROR:cache_util_win.cc(20)] Unable to move the cache: Zugriff verweigert (0x5)
[13512:1219/213241.169:ERROR:cache_util.cc(145)] Unable to move cache folder C:\Users\magsu\AppData\Roaming\Code\Cache\Cache_Data to C:\Users\magsu\AppData\Roaming\Code\Cache\old_Cache_Data_000
[13512:1219/213241.169:ERROR:disk_cache.cc(196)] Unable to create cache
I tried to reboot, cleaned and emptied the cache, deinstalled and reinstalled VS code.
I have experienced the same error message with node and python applications. In my case the issue was that I have executed the script file without the language prefix. Instead of:
node myscript.js
python myscript.py
I have executed:
myscript.js
myscript.py
I hope that this answer helps anyone having the same issue.
Either the permissions are bad or some process is holding a lock on those files (more likely).
I'm guessing in the background you have some process open that uses these files. For example, a dev server. Try killing all node processes via Windows Task Manager if you can't find the window and then try again.

Can't access .well-known/acme-challenge folder

I'm trying to install an SSL certificate on my shared hosting by Plesk.
It worked before, but the renewal went wrong.
I finally uninstalled the certificate, but when I try to get a new one, I can't access the .well-known/acme-challenge folder.
I tried to put a test file inside but ends up with a 404 error.
If I place the file inside .well-known, I can access it.
If I rename the acme-challenge folder to acme2-challenge, I can access it.
What makes this specific acme-challenge file so protected, and where can I unprotect it?
There may be an Apache module or config that controls the directory. Search a config acmetool and the module md in the Apache board or in command line with grep -rinF acme /etc/apache2.
There are two common modules that manages acme, so to fix it, you may run sudo a2disconf acmetool or sudo a2dismod md, then regenerate certificate (you may have to wait one hour or one day if you reach the limit of Let's Encrypt).
To avoid a future issue, search for the package that modified the apache config too.

Run .bat as a Windows Service

I'm here again with another case that is getting me out my mind.
So, this is happening, I'm trying to run an executable java class(.jar) as a Windows Service, and all my attempts failed so far. To make it a little easier, I turned my jar into a batch file, wich only executes the jar in background, here is the code:
start "" javaw -jar C:\LocalService.jar
The batch works fine. However I have tried to install this batch as a service by using the next line in cmd:
sc create "LocalService" binPath= "C:\LocalService.bat"
The Service installs correctly, but as soon as I try to start it, it pops up an error (The code error is 1053, says something about the service did not start correctly)
Also, I have try with a software called NSSM (non-sucking service manager) It installs fine too, but the service does not start either.
Do you guys know what am I missing?
By the way, I'm doing all this on Windows 7 Professional.
Thanks!
thanks for your comments
Both tools didnt work for me, sadly. However I was able to do it with a software called Java Service Wrapper. This is not a free software, so I needed to buy a license to get it to work.
The steps were simple:
1.-Create a folder with the name of the service, then inside add 4 folders: lib,bin,logs,conf
2.-On the lib folder you have to copy your jar and also the wrapper.jar and wrapper.dll (these last two are in the zip you download from the website)
3.-Copy 4 files to the bin folder: InstallApp-NT.bat.in, App.bat.in, UnintstallApp-NT.bat.in and wrapper.exe (this last one is the one that defines your license, if you can get a file wrapper.exe from somebody else who had paid a license it will work fine. These file also came in the zip from the website) Remove the .in from the batch files
4.-The most tricky step is this: You have to copy from the wrapper's folder called conf a file called wrapper.conf.in Remove the .in extension and edit it with a tex editor. The most important lines you have to edit are:
wrapper.java.command=C:\Program Files (x86)\Java\jre7\bin\java //Specify JRE Path. Will work with eviroment variable
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp //Choosing this class means your are using a .jar file to execute when the service starts
wrapper.java.classpath.1=C:\LocalService\lib\wrapper.jar //This one is constant.
wrapper.java.classpath.2=C:\LocalService\lib\LocalService.jar //This is the path to your executable jar
wrapper.java.library.path.1=C:\LocalService\lib //Path to your own lib folder (the you created at the begining)
wrapper.app.parameter.1=C:\LocalService\lib\LocalService.jar // again the path to your jar
Then just execute the InstallApp-NT.bat and start the service and your are done
It worked to me with absolute paths, however according to documentation it will work fine with relative path too.
This is how I solved my problem and I hope someone with the same issue will find this helpful
See you next time!

what does "Connecting to database specified by database.yml" in the log file mean?

I'm working on a Rails 3.2.9 app , on performing a certain action, the app doesnt go any further and when i chech the log file i get this line to be the last in the log
Connecting to database specified by database.yml
I have no idea what's causing this problem.. When i sign up or sign in also it needs to connect to db and it works fine then.. only when a function (called execute test case) is clicked, the app doesnt go further and freezes there itself..
Please help me if you have come across this ...or suggest what may be the cause!!
Check this answer. This may help you.
Rails Connecting to database specified by database.yml
I found the cause of this error.. Problem is when the gem ‘mysql2’ is installed for the app , it might not be the one compatible with the version of MySQL server that is installed in our machine. And also a corresponding libmysql.dll file to be copied to Ruby folder.
So install the gem by specifying the local directory of Mysql
1.In the cmd,
gem install mysql2 -- --with-mysql-dir=C:\Program Files\MySQL
As directed in the cmd, follow the link to download the dll. Extract the zip from that location and copy the file as instructed in cmd
If the zip is empty or the link shows file not exist.(which does happen for some versions!!)
--> Go to the link and follow the flow in the url.. Like the website.. http://dev.mysql.com ->downloads -> MySQL Connectors -> MySQL Connector/C -> the latest version zips are displayed.. Choose the one with the exact file name as in the empty zip/broken link. If not click on previous GA versions and find the according zip file. Download, extract and copy the libmysql.dll to Ruby’s bin folder

non executable folder

How to make map/folder/dir not executable like I want to have images folder and there I want to say in ubuntu folder/home/images/ is only for photos like jpg,jpeg,png,gif and if for any reson someone upload some script like script.php can NOT fire that script!
So make folder where no script can be fired (executed) in ubuntu?
I think it has to be something with permissions 666 or 644, but I'm not sure if that is correct.
well, a php file isn't executed (it's read by the php-module) so you're not save disabling the x-bit.
You must filter the uploads on file-suffix.
You should configure your web server not to run scripts from the upload directories.

Resources