Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Set FTP permissions at creation time, not with a recurring chmod job. Configure the daemon’s file and directory umask, then make the upload directory’s owner, group, setgid bit, and (when necessary) default ACL match the people or services that must use the files.

For vsftpd, the central settings are file_open_mode, local_umask, and anon_umask. For ProFTPD, use Umask, optionally supplying separate file and directory masks. Verify the resulting mode, owner, group, ACL, and parent-directory traversal permissions after testing both local and anonymous accounts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How Linux decides an FTP upload’s permissions

An FTP daemon asks the kernel to create a file or directory with a requested mode. Linux then removes every permission bit present in the process umask. The Linux man-pages description is precise: the umask is used by open(2), mkdir(2), and other creation system calls to modify permissions placed on new objects.

For a regular file, the usual requested base mode is 0666. For a directory, it is normally 0777. The umask can remove bits; it cannot add permissions that the requested mode did not contain. A parent directory’s default ACL is an important exception to the simple calculation: when one exists, Linux can use that ACL to derive the access ACL instead of applying only the ordinary umask formula.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Common mode calculations

Object Requested base Umask Result Meaning
Regular file 0666 0022 0644 Owner can read and write; group and others can read.
Regular file 0666 0027 0640 Owner can read and write; group can read; others have no access.
Directory 0777 0022 0755 Owner can modify; group and others can traverse and read directory entries.
Directory 0777 0027 0750 Owner can modify; group can traverse and read; others have no access.

The bit operation often shown in the Linux umask(2) documentation is 0666 & ~022 = 0644. ProFTPD presents the same idea as 0644 = 0666 - 0022 and 0755 = 0777 - 0022; the subtraction notation is shorthand for clearing the masked bits, not arithmetic that can borrow between digits.

Creation mode is different from ownership

Mode bits control read, write, and execute access. They do not choose the user or group owner. The creating process normally becomes the file owner. The group is determined by filesystem rules and the parent directory, including setgid-directory behavior and relevant mount options. A correct umask therefore cannot compensate for an upload directory whose group or traversal permissions are wrong.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the permission policy before editing the daemon

Write down who uploads, who reads, who edits, and whether anonymous users are involved. Then choose the narrowest mode that supports that workflow.

Workflow Typical file target Typical directory target Design emphasis
Private local account 0600 or 0640 0700 or 0750 Keep access with the account, or grant read access to a trusted group.
Several local users share files 0640 or 0660 2770 or 2775 Use a dedicated group and setgid on the directory so new objects inherit that group.
Anonymous drop box Usually a non-executable, non-world-readable mode A separately isolated upload directory Use an anonymous-specific umask, restrict traversal, and arrange ownership for the process that later handles the files.
Public download area A mode that permits the intended read access A directory searchable by downloaders Separate upload and download paths when writers should not be able to alter published files.

These are policy examples, not universal defaults. A mode such as 0660 is useful only when the inherited group is the intended collaboration group and the parent directory permits that group to traverse it.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Configure vsftpd

vsftpd separates the requested file mode from the masks used by local and anonymous sessions. Edit the configuration file used by your distribution, commonly /etc/vsftpd.conf, and make the octal arithmetic explicit.

Least-privilege local uploads

# Regular uploaded files start from 0666.
file_open_mode=0666

# 0666 with 0027 cleared becomes 0640 for local-user uploads.
local_umask=0027

# Anonymous sessions have their own policy, if enabled.
anon_umask=0077

# Leave client-side SITE CHMOD disabled unless there is a documented need.
chmod_enable=NO

With file_open_mode=0666 and local_umask=0027, a normal local-user file is expected to start at 0640, subject to a parent default ACL and any daemon or post-upload behavior. Do not change file_open_mode to 0777 merely to obtain broad access. That requests execute bits in the regular-file base mode and establishes an unsafe baseline; collaboration should come from group ownership, setgid directories, or ACLs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What each vsftpd directive controls

Directive Purpose Important qualification
file_open_mode Requested mode for newly created regular files. It is a ceiling for the file mode; the umask still removes bits.
local_umask Mask applied for authenticated local users. It does not set ownership or override a parent default ACL.
anon_umask Mask applied to anonymous sessions. Configure it independently; never assume anonymous uploads use the local-user value.
chmod_enable Controls whether clients may issue FTP SITE CHMOD. Keep it disabled unless a narrowly defined operational requirement exists.
chown_uploads, chown_username, chown_upload_mode Optional handling for ownership and forced mode of anonymous uploads. Use these only after deciding which account should process anonymous files and testing the resulting ownership and mode.

Apply and test the change

  1. Back up the active configuration and confirm that the service reads the file you edited.
  2. Validate the syntax using the validation method supplied by your distribution or service package.
  3. Restart or reload the vsftpd service with the distribution’s service manager. A reload may not re-read every setting on every package, so restart when the package documentation requires it.
  4. Upload a uniquely named file as a local account. If directory creation is part of the workflow, create a uniquely named directory in a separate test.
  5. If anonymous uploads are enabled, repeat both tests anonymously; the anonymous branch can have different masks and ownership.
  6. Inspect the objects locally with the verification procedure below before allowing production uploads.

Configure ProFTPD

ProFTPD uses the Umask directive. It accepts an octal file mask and, optionally, a separate directory mask. Put it in the context that actually governs the session: the server configuration, <Global>, <VirtualHost>, <Anonymous>, or an applicable directory scope.

Separate file and directory masks

# Files:    0666 & ~0027 = 0640
# Directories: 0777 & ~0027 = 0750
Umask 0027 0027

ProFTPD documents a normal file base mode of 0666 and a directory base mode of 0777; uploaded regular files are not created with execute bits enabled by default. The two-mask configuration above therefore requests 0640 files and 0750 directories, unless an ACL or later process changes the result.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Use context deliberately

  • A server-wide Umask affects more sessions than a directive inside an anonymous or virtual-host block.
  • Place a different mask in an <Anonymous> context when anonymous uploads need stricter treatment than authenticated users.
  • After changing nested configuration, test a session that enters the exact virtual host, directory, or anonymous context; a successful test against another context proves nothing about the first one.

Executable uploads and SITE CHMOD

Umask removes permissions; it does not grant execute permission. If an uploaded program must become executable, use a separate, tightly controlled post-upload process or a narrowly authorized SITE CHMOD operation. ProFTPD documents SITE CHMOD and supports restricting it with a policy such as <Limit SITE_CHMOD>. Do not expose unrestricted mode changes to untrusted FTP users.

Build the upload directory for the intended users

The daemon’s mask is only one layer. The FTP account must be able to reach every parent directory, and the upload directory must have the right owner and group.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Dedicated group and setgid inheritance

  1. Create or select a dedicated group for the workflow, such as a group used only by the FTP service and the application that consumes uploads.
  2. Make the upload directory owned by the intended service account and that group.
  3. Grant the group the minimum required read, write, and search permissions.
  4. Set the directory’s setgid bit. A setgid directory causes newly created files and subdirectories to inherit the directory’s group on filesystems that support the normal Unix behavior.
  5. Add each legitimate reader or writer to the group, then verify that their parent-directory traversal permissions are present.

For a collaborative directory, a mode such as 2770 expresses owner and group read/write/search access plus setgid, while denying access to others. The exact mode depends on whether non-members must read or traverse the path. Do not use chmod 777 as a shortcut: it grants write access to every local account and hides an ownership design problem.

Why setgid is not a substitute for a group policy

Setgid controls inherited group ownership; it does not add group write permission to a file whose mode lacks it. Pair it with a daemon mask that leaves the required group bits, and confirm that the filesystem and mount options preserve the expected inheritance. Conversely, a file can have group write permission and still be unusable if a parent directory denies search permission.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Use default ACLs when mode bits are not enough

A default ACL on the upload directory is appropriate when a specific set of users or groups needs inherited permissions that one owner/group mode cannot express. Linux can use that parent default ACL in place of the ordinary umask calculation, so the resulting mode may differ from the simple 0666 & ~umask prediction.

Design the ACL before applying it

  • Identify the exact users and groups that need read, write, or search access.
  • Give the directory an access ACL that permits the current service account to operate.
  • Add a default ACL for the intended inherited owner, group, and other entries.
  • Inspect the ACL mask entry; it limits the effective permissions of named users and groups.
  • Retest both files and directories, because directory inheritance and regular-file creation can produce different effective permissions.

Use your distribution’s setfacl and getfacl tools to apply and inspect ACLs. For example, a dedicated collaboration group might receive access and a matching default entry on the upload directory; adapt the group name and permissions to the actual workflow rather than copying a permissive example. Keep the daemon umask conservative even when ACLs are present, because files created outside that directory or after a move may not inherit the same defaults.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify mode, ownership, ACLs, and traversal

Always test the object that was actually created. Configuration files show intent; the filesystem shows the result.

  1. Record the daemon, virtual host or server context, account type, username, and destination path used for the test.
  2. Upload a uniquely named regular file.
  3. Create a separate uniquely named directory through FTP if the workflow allows directory creation.
  4. On the Linux host, run stat -c '%A %a %U %G %n' FILE for each object. This prints symbolic mode, numeric mode, owner, group, and name.
  5. Run namei -l PATH on the complete path. Check every parent directory for the owner, group, and search permission needed by the FTP account and any consumer.
  6. If an ACL is possible, run getfacl FILE DIRECTORY and inspect access and default entries, including the effective-permission mask.
  7. Compare local-user and anonymous results separately, then check service logs for a post-upload action or an error that caused the daemon to use another path.

A successful upload confirms only that the FTP process could create the object. It does not prove that a second local user, web service, backup job, or application can read or modify it.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Troubleshoot unexpected permissions

Files are 0600 instead of the expected group-readable mode

  • Confirm which account performed the upload. Anonymous sessions use anon_umask in vsftpd and may enter a separate ProFTPD context.
  • Check the effective daemon configuration rather than a sample file or an unused include.
  • Inspect the parent directory with getfacl; a default ACL can change the normal umask result.
  • Look for a post-upload hook, watcher, application move, or security service that runs chmod after creation.

Files are 0644 when group write was required

A mask of 0022 removes group write, and the conventional regular-file base mode is only 0666. Choose a policy that deliberately leaves the group write bit, such as a compatible mask and group design, then test whether the inherited group is correct. Do not solve this by granting write permission to everyone.

Directories are not group-writable or cannot be entered

  • Check the directory mask separately; in ProFTPD it can be the second value in Umask.
  • Verify that the parent directory has the setgid bit if group inheritance is expected.
  • Use namei -l to find the first parent lacking search permission.
  • Check ACL entries and their effective mask.

The owner or group is unexpected

Umask never changes ownership. Review the effective FTP account, the parent directory’s owner and group, setgid state, filesystem behavior, and any anonymous-upload ownership directives. In vsftpd, chown_uploads, chown_username, and chown_upload_mode can intentionally alter anonymous-upload handling; test those settings with an actual anonymous upload.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An uploaded file is executable

Find the component that added the execute bit. A standard 0666 file base plus a umask does not add execute permission. Check for a client-issued SITE CHMOD, a post-upload script, an application rename or extraction step, and any daemon setting that permits client-side mode changes.

The FTP client reports success but another service gets permission denied

Inspect the complete path, not only the file. The consumer needs search permission on every directory, appropriate access to the file, and the correct group membership or ACL entry. Chroot or virtual-root configuration can also make the FTP-visible path differ from the host path you inspected.

Security rules that should not be compromised

  • Use the narrowest umask that supports the stated workflow.
  • Keep anonymous uploads in an isolated directory and separate them from files that are immediately served or executed.
  • Do not request 0777 as a regular-file base mode.
  • Do not use chmod 777 to repair a missing group or ACL design.
  • Disable client-side SITE CHMOD unless it is required, and restrict it to the smallest trusted scope when enabled.
  • Prevent uploaded files from being executable by default; process any intentional executable upload through a controlled, auditable step.
  • Treat filesystem permissions as the primary access control. The vsftpd reference specifically warns that upload and chroot-related settings are security-sensitive.
  • Log account, path, and result for test and production uploads so a later mode change can be traced to the responsible process.

Three working designs

Private local-user area

Use file_open_mode=0666 with a local umask that removes group and other access as required by the account’s policy. Keep the directory owned and searchable only by that account or a tightly controlled group. Verify that no default ACL broadens access.

Shared application handoff

Create a dedicated group containing the FTP account and the application worker. Make the upload directory group-owned, set its setgid bit, and choose a file mask that preserves the group permissions the application needs. Add a default ACL only if multiple named users or groups cannot be represented cleanly by the owner/group mode. Test an FTP upload and the application’s read or move operation as separate identities.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Anonymous drop box

Use an anonymous-specific mask, isolate the directory from published content, and arrange ownership so a trusted process can inspect or move the files. If vsftpd anonymous ownership directives are enabled, confirm the final owner and forced mode with stat. Never infer anonymous behavior from a successful local-user test.

Operational checklist

  • Policy identifies local and anonymous users separately.
  • File and directory target modes are written down.
  • Daemon settings use octal values and the correct configuration context.
  • Regular-file and directory calculations have been checked against the requested base modes.
  • Upload directory owner, group, setgid state, and traversal permissions are intentional.
  • Default ACLs are present only where needed and have been inspected.
  • Client-side mode changes are disabled or narrowly restricted.
  • A local upload and, where applicable, an anonymous upload have both been tested.
  • stat, namei, and getfacl results match the policy.
  • Logs and post-upload processes have been checked for later ownership or mode changes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.