Displaying 2 results from an estimated 2 matches for "process_remove".
2012 Oct 23
4
Disable rm on sftp
...I need to disable removing
file or removing directory using SFTP. In other words, the user can only
write, move but not delete the file. This will be used to store logs so, I
need to make sure once the logs written to my server the user cannot remove
it.
I tried doing this by changing the code of process_remove from:
static void
process_remove(void)
{
char *name;
u_int32_t id;
int status = SSH2_FX_FAILURE;
int ret;
id = get_int();
name = get_string(NULL);
debug3("request %u: remove", id);
logit("remove name \"%s\"", name);
if (readonly)
status = SSH2_FX_PERMISSION_DENIED;...
2017 May 23
6
[Bug 2721] New: Improve SFTP server to make remove always work on ZFS/Btrfs
...e OpenSSH
Version: 7.5p1
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: P5
Component: sftp-server
Assignee: unassigned-bugs at mindrot.org
Reporter: walteste at inf.ethz.ch
The code in process_remove() in sftp-server.c just tries a simple
unlink for the file to be deleted. This does not work well on ZFS or
Btrfs if the filesystem/pool is completely full, which is a well known
problem of CoW filesystems. See here ofr instance:
http://www.surlyjake.com/blog/2010/01/19/zfs-cant-rm-no-space-left...