A quick guide to fix the following error message given in Hyper Backup Explorer when trying to access a usb backup.
Insufficient privileges to access some subfolders under the destination shared folder. Please contact the destination administrator for assistance.
The application actually outputs the error to a log under the running directory called HyperBackupExplorer.log
and contains the following
2017-06-03 01:28:57 PM (5775) [debug] target_manager.cpp:186 synobkpinfo.db [/media/user/drive/diskstation_backup/synobkpinfo.db] access failed Permission denied
2017-06-03 01:28:57 PM (5775) [debug] target_manager.cpp:186 synobkpinfo.db [/media/user/drive/diskstation_backup/synobkpinfo.db] access failed Permission denied
2017-06-03 01:28:57 PM backuptargetimpl.cpp:73 get target failed
A simple fix for this is to change the file permissions for the database file with the following command (note please change the media directory path with the correct mount path for the drive):
cd /media/user/drive/diskstation_backup/
sudo chmod o+r synobkpinfo.db
Looking for Ubuntu 16.04/16.10?
Quick guide on how to install nvidia drivers on a fresh install of Ubuntu 17.04 with full disk encryption. The following steps were tested with a GTX 1070 and Intel HD Graphics 530 integrated graphics.
sudo apt-get update && sudo apt-get upgrade
ctl-alt-f1
and loginsudo /etc/init.d/lightdm stop
sudo apt-get --purge remove xserver-xorg-video-nouveau
nvidia-381
with whatever version you’d likesudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-381
sudo nvidia-xconfig
/etc/default/grub
with your favorite editorFrom: GRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash noplymouth"
To: GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_GFXMODE=2560x1440
update-grub
reboot
Note: the first first booting after these changes might only show a black screen, just type in the encryption password and enter and it should login. This seems to only happen the first time.
Looking for Ubuntu 17.10?
Quick guide on how to install nvidia drivers on Ubuntu 16.04 (tested with 16.04 and 16.04.1 installs with a GTX 1070 and Intel HD Graphics 530 integrated graphics).
sudo apt-get update && sudo apt-get upgrade
ctl-alt-f1
and loginsudo /etc/init.d/lightdm stop
sudo apt-get --purge remove xserver-xorg-video-nouveau
nvidia-367
with whatever version you’d likesudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-367
sudo nvidia-xconfig
Special notes about full disk encryption [2],[3],[4],[5]
I had best results editing the grub config with the following via recovery mode
/etc/default/grub
with your favorite editorGRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash noplymouth"
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_GFXMODE=2560x1440
update-grub
reboot
Completed grub file looking simpler to:
# /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash noplymouth"
GRUB_CMDLINE_LINUX=""
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=2560x1440
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
[3] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1359689/comments/73
[4] https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1386005/comments/72
[5] http://askubuntu.com/questions/362722/how-to-fix-plymouth-splash-screen-in-all-ubuntu-releases
In addition to the reference documentation of spring data jpa auditing. This is my interpretation of how to implement auditing and auditor aware in spring applications using JavaConfig. Please note that this requires having version 1.5.0.RELEASE or greater.
First, I created a base abstract class for entities which will hold definitions for created, last modified by and created, last modified by date. These can be described by using annotations @CreatedBy
, @LastModifiedBy
, @CreatedDate
, and @LastModifiedDate
. In this case I used joda time to define the type of date. The reference documentation also mentions adding AuditingEntityListener
to the orm.xml
file, however, if you wish to not include a xml file, you can add @EntityListeners(AuditingEntityListener.class)
annotation to the abstract entity class. Here is an example:
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractEntity {
@CreatedDate
@NotNull
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
private DateTime createdDate = DateTime.now();
@LastModifiedDate
@NotNull
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
private DateTime lastModifiedDate = DateTime.now();
@CreatedBy
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn
@NotNull
private Account createdBy;
@LastModifiedBy
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn
@NotNull
private Account lastModifiedBy;
...
}
For created by and last modified by to be filled in with spring security principal information you use the AuitorAware<T>
interface. Here is an example calling the account service to gain access for the current account information. The @Component
annotation was used so a bean definition did not need to be defined in the configuration class which was suggested in the reference documentation.
@Component
public class SpringSecurityAuditorAware implements AuditorAware<Account> {
@Inject private AccountService service;
@Override
public Account getCurrentAuditor() {
return service.getCurrentAccount();
}
}
@Override
public Account getCurrentAccount() {
SecurityContext securityContext = SecurityContextHolder.getContext();
UserDetailsCustom springSecurityUser = (UserDetailsCustom) securityContext.getAuthentication().getPrincipal();
return springSecurityUser.getAccount();
}
Finally, add the annotation @EnableJpaAuditing
to have the configuration be loaded. Also be sure to add jadira.usertype.databaseZone
to the hibernation configuration (in this case) to set the timezone for joda time.
@Configuration
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
...
public class DataBaseConfig { }
If you care about testing (and you should), here are some tips one getting auditing working with your integration tests. First, create a new component for a mock auditor aware class. This will allow for auditing without the need for spring security.
@Component
public class MockAuditorAware implements AuditorAware<Account> {
private Account currentAuditor;
@Override
public Account getCurrentAuditor() { return currentAuditor; }
public void setCurrentAuditor(Account account) {this.currentAuditor = account; }
}
Be sure to add the mock auditor aware reference in the test configuration class.
@Configuration
@EnableJpaAuditing(auditorAwareRef = "mockAuditorAware")
...
public class TestConfig { }
Finally, in a base integrations test class, you can add a before statement for setting the auditor for all your tests:
@PersistenceContext protected EntityManager em;
@Inject protected MockAuditorAware auditorAware;
@Before
public void wireUpAuditor() {
auditorAware.setCurrentAuditor(em.getReference(Account.class, 1));
}
Reference for installing Eclipse in Ubuntu 12.10 with the intention of installing Android afterwards. If you are not intending to install Android you can leave out installing ia32-libs and the ADT plugin.
Download Eclipse
Install requirements:
# openjdk is for java
# ia32-libs is the 32-bits libs for Android (only needed for 64-bit)
sudo apt-get install openjdk-7-jdk ia32-libs
Extract the eclipse tar:
tar -xzf eclipse.tar.gz
Move folder into opt directory:
sudo mv eclipse /opt/
Create the desktop profile for unity:
sudo gedit /usr/share/applications/eclipse.desktop
# Enter the below text:
#######################
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop
Create a symbolic link in your bin folder:
sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse
Clean launch eclipse for the first time:
/opt/eclipse/eclipse -clean &
Install ADT Plugin (Help -> Install New Software):
https://dl-ssl.google.com/android/eclipse/