Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Cant rename files

Indeed this does not look like a WinSCP question – Unless you can rename the file using any other SFTP client.

Your duplicate question on Super User:
https://superuser.com/q/1554357/213663
taylorabc101

Cant rename files

This is more of an SFTP issue but I've run out of places to ask for help.

I currently have a atmoz/sftp docker container setup with one user. I can create/move/delete files but when I try to rename a file I get error code 3 permission denied. This is using winscp and the folder permission mask is 777. so the file I create has permissions 777 when I try to rename it and is owned by user.

File structure: /home root:744 /user root:744 /home user:777 /subdirectory user:777 ...files user:777

Home is owned by the user with 777 perms for testing purposes

sshd_config:

# Secure defaults

# See: https://stribika.github.io/2015/01/04/secure-secure-shell.html
Protocol 2
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key

# Faster connection
# See: https://github.com/atmoz/sftp/issues/11
UseDNS no

# Limited access
PermitRootLogin no
X11Forwarding no
AllowTcpForwarding no

# Force sftp and chroot jail
Subsystem sftp internal-sftp
ForceCommand internal-sftp
ChrootDirectory %h

# Enable this for more logs
#LogLevel VERBOSE


I cannot figure out what is stopping me from renaming files

Steps to reproduce: -Copy docker-compose.yml -Edit to function in your environment -docker-compose up

docker-compose.yml

version: '3'

services:

sftp:
image: atmoz/sftp
ports:
- "4570:22"
volumes:
- "./DIRECTORY_TO_COPY:/home/${NAME}/home/Storage"

command: ${NAME}:${PASSWORD}:1001