Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: john56 on February 27, 2019, 07:02:09 PM
-
Hi,
is it possible to do it with home folders ?
Today, someone has lost 3 hours of work by delete his file .... i don't know how to get it back, but maye it's possible to avoid it for the futur ?
Many thanks.
-
Sure,
Searching recycle bin on wiki:
https://wiki.contribs.org/RecycleBin#Enable_Recycle_Bin_for_users
Any backup?
-
Of course i have a backup (i have a good teacher whose name is JPP :lol:) but my backup is the night, not along the day. (She wrote her file during the day)
I knew there was a recycle bin for "shared_folder" but not for ibays and /homes. It's a good new. I used your link to activate recycle bin for my users and i have done it for my shared folder too (with the contrib's options).
It seems to work.
But, is there a way (as for ibays way) to rename recycle bin for users and shared folders and to hide it.
Thanks.
-
Edit: RTFM! ;)
Well in fact just keep reading the same page i pointed out.
https://wiki.contribs.org/RecycleBin#Changing_the_Recycle_Bin_name
If you want it integrated, please do so by opening a bug against sme 10 to get it included. Yes sme 10 as only security patch are welcomed for sme9 now. Time to move on.
-
By the way some limitations with samba recycle bins. It only work if you actually erase the file. Not if you alter it.
-
This worked for me to make "Recycle Bin" a hidden folder:
/etc/e-smith/templates/etc/smb.conf
mkdir -p "$(pwd |sed 's/templates/templates-custom/')"
sed 's/"Recycle Bin"/".Recycle Bin"/' 10recyclebin > "$(pwd |sed 's/templates/templates-custom/')/10recyclebin"
expand-template /etc/samba/smb.conf
/etc/rc7.d/S91smb restart
Here is a less cryptic version:
mkdir -p /etc/e-smith/templates-custom/etc/smb.conf
cp /etc/e-smith/templates/etc/smb.conf/10recyclebin /etc/e-smith/templates-custom/etc/smb.conf
cd /etc/e-smith/templates-custom/etc/smb.conf
sed -i 's/"Recycle Bin"/".Recycle Bin"/' 10recyclebin
expand-template /etc/samba/smb.conf
/etc/rc7.d/S91smb restart
To UNDO these changes:
'rm' -f /etc/e-smith/templates-custom/etc/smb.conf/10recyclebin
expand-template /etc/samba/smb.conf
/etc/rc7.d/S91smb restart
[edit]
Add missing "cd /etc/e-smith/templates-custom/etc/smb.conf" to second code example
-
Thanks for your answers.
I don't use ibays but shares folder contrib. I will try to adapt it with those scripts, but i am always affraid to make a mistake by playing with the commands.
-
First try on your test server on a vm, as always.
It is there to be broken anyway !
-
Hi @mmccarn,
it doesn't work for me for home's users and shares folder (no ibay for me).
No error with your command lines.
-
Hi @mmccarn,
it doesn't work for me for home's users and shares folder (no ibay for me).
No error with your command lines.
Sed line on second non cryptic version is missing the full path of the file. So either you need to move to the newly created template custom folder either you need to write full path of file
-
That is ok for user's home by adding a dot .Recycle Bin.
For the share folders it seems i have to adapt /etc/e-smith/templates/etc/smb.conf/shares/recyclebin
-
Sed line on second non cryptic version is missing the full path of the file. So either you need to move to the newly created template custom folder either you need to write full path of file
Doh. Missing "cd /etc/e-smith/templates-custom/etc/smb.conf" added to the original post...