How to check which ps is keeping nfs mount busy

sudo fuser -c /mount_point

It will give an output like:

/mount_point: 25422c

then ps for the number before c

That’s it!

Enjoy!

Posted in Uncategorized | Leave a comment

How to restart OpenVPN Service on CentOS 7

systemctl restart openvpn@server.service

Posted in Uncategorized | Leave a comment

Bypass Code Integrity Checking in ownCloud 9

This is an added security feature in ownCloud 9 to sign all the changes to avoid malicious code or files in ownCloud releases.

However, due to a bug in ownCloud 9.0.0, this message appears by mistake when installing some official apps like the Antivirus app, this has been fixed in ownCloud 9.0.1, which hasn’t been released till the moment.

As a temporary workaround to stop seeing this message, just go to the version.php file, and change the release string from “stable” to anything else, e.g. “myownrelease”

Rescan, then the error message will be gone.

Source: https://doc.owncloud.org/server/9.0/developer_manual/app/code_signing.html

Posted in Cloud, owncloud, Uncategorized | Tagged , , , , , | Leave a comment

How to force usage of DNS name instead of IP in ownCloud

Sometimes when sharing a link in owncloud, especially on the mobile and desktop clients, the links are using the IP address instead of the DNS name.

This behavior can be changed by using the overwritehost parameter in the config.php file included inside /var/www/owncloud/config folder.

So, for example, if you are using the DNS name cloud.storage.com, then you should add the parameter as follows:

‘overwritehost => ‘cloud.storage.com,

Source: https://github.com/owncloud/core/issues/11873

Posted in Cloud, Uncategorized | Tagged , , , | Leave a comment

How to mount a file created using dd command

I created an exact copy of a bootable USB drive using the dd command (which is an extremely cool tool by the way) using the following command:

dd if=/dev/sdb of=myFile.img

After that, to mount it, you can simply use the kpartx command, as follows:

=================================================

mkdir hobba

sudo kpartx -a myFile.img
sudo mount /dev/mapper/loop0p1 hobba -o loop,ro

=================================================

where loop0p1 is the first partition, loop0p2 will be the second partition, and so on.

Enjoy!

Source: GrGr on http://superuser.com/questions/117136/how-can-i-mount-a-partition-from-dd-created-image-of-a-block-device-e-g-hdd-u

Posted in Linux, Ubuntu | Tagged , , , | Leave a comment