I have been asked to set up a shared directory for a colleague on a server I manage. I created an account for him on that server, set up a Samba password with smbpasswd, created a directory and set it up in the smb.conf file, which I copy below:[global]workgroup = OURWORKGROUPserver string = Samba Server %vnetbios name = server_i_runsecurity = usermap to guest = bad username resolve order = bcast lmhosts host wins dns proxy = no[coworkerguy]path = /samba/coworkerguyvalid users = coworkerguyguest ok = nowritable = yesbrowsable = yesNow I have been asked to limit this space to 2Gb. I have looked online for ideas but I can't find anything recent and setting up disk quotas is apparently one of the most popular solutions. I admit I'm not that confident doing that, and furthermore it often comes up that I have to reboot in single user mode - unless I misunderstood something. That is not possible, as I can only ssh remotely to that server. Are there are techniques I could use? If not, could someone point me to an idiot-proof guide?
Set a size limit to SAMBA shared directory remotely
samba;administration;cifs
My solution is not the best, I know, but it works ;-). EDIT: Please read my other answer as well, this answer is an evil hack!Create a 2Gb file with dd, format the file e.g. ext3, mount it, add it to fstab and use that as a share.$ dd if=/dev/zero of=filename bs=1024 count=2M$ sudo mkfs.ext4 filename$ cat /etc/fstab/path/to/filename /mount/point ext4 defaults,usersNow you point the share to /mount/point (or wherever you chose to mount it), sopath = /samba/coworkerguy becomespath = /mount/pointIn UNIX, everything is a file.