SFTP/FTP File Access Config Tool
<p>A tool to properly configure file permissions and access for FTP and SFTP servers with secure settings. Generate commands to set up users, permissions, and security configurations.</p>
SFTP/FTP File Access Config Tool
Configure Server Settings
Root directory for the FTP/SFTP user
Directory where uploads will be stored (will be created inside user's home)
Understanding FTP/SFTP User Permissions
Properly configured permissions are essential for secure FTP/SFTP access. Each protocol has different security characteristics, with SFTP (SSH File Transfer Protocol) generally offering better security through SSH encryption and easier chroot jail configuration.
Protocol Comparison
| Feature | SFTP | FTPS | FTP |
|---|---|---|---|
| Encryption | Full (SSH) | Full (SSL/TLS) | None |
| Default Port | 22 (SSH) | 990 | 21 |
| Firewall Friendly | Yes (single port) | No (multiple ports) | No (multiple ports) |
| Chroot Jail | Easy to configure | More complex | More complex |
| Authentication | Password or Key-based | Password | Password (plaintext) |
Security Best Practices
- Use SFTP instead of FTP whenever possible (built-in encryption)
- Implement chroot jail to restrict users to their home directories
- Apply the principle of least privilege with restrictive permissions
- For SFTP, consider using key-based authentication instead of passwords
- Disable shell access for FTP/SFTP users if they only need file transfer
- Regularly audit user accounts and remove unused ones
- Use strong passwords and consider implementing account lockout policies
- Keep your FTP/SFTP server software updated
Common Permission Issues
Troubleshooting Permission Problems
- Cannot upload files: Check write permissions on upload directory (needs at least 755)
- Cannot list directories: Directory needs read and execute permissions (at least 550)
- SFTP chroot fails: Root of chroot must be owned by root and not writable by other users
- Parent directory issues: Check permissions on all parent directories up to the root
- SELinux blocking access: May need to set appropriate SELinux context labels
Related Tools
Account Lock/Unlock Script Generator
Generate Linux user account lock/unlock scripts and commands. Create automated scripts for managing account security, password policies, and user access control with comprehensive logging and notifications.
Bind Mount Generator
Generate bind mount configurations for chroot environments, containers, and directory overlays. Create mount commands, fstab entries, and systemd mount units with proper options for various bind mount scenarios.
Command Retry Cron Generator
Create cron jobs with intelligent retry logic and exponential backoff for failed commands. Generate retry scripts, systemd timers, and cron entries with configurable retry strategies.
Scheduler with Random Delay Generator
Generate cron schedules with random delays to prevent thundering herd problems. Add jitter to your scheduled jobs.
Scheduler for Holiday-Safe Execution (skip weekends/holidays)
Create cron schedules that automatically skip weekends and holidays. Generate business-day-only scheduling expressions.
Timezone Cron Adjuster (convert job to UTC)
Convert cron expressions between different timezones. Adjust scheduled jobs for UTC or other timezone requirements.
Master Linux Scheduling
Get notified about new Linux tools and tutorials.