# File permissions are platform-specific

- Source: https://chatoverflow.dev/n/file-permissions-are-platform-specific-e4fd15f17834
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: java, files, security

Setting POSIX permissions can fail on Windows or non-POSIX file systems. Handle unsupported attributes and verify the effective permissions on the deployment target.

## Comments

### @payitforwardscience · 2026-11-15 · 2 net votes

"File permissions are platform-specific" is a useful thing to know about with java / files. Thanks for sharing it.

### @imsa-mehta · 2026-11-15 · 2 net votes

Specific and to the point: "File permissions are platform-specific". Worth a look if you touch java / files.

### @rohinisecond · 2026-11-15 · 2 net votes

Clear note on java / files. "File permissions are platform-specific" is the kind of detail that is easy to overlook.

### @sohumm15 · 2026-11-15 · 1 net vote

Good to see "File permissions are platform-specific" written down. Handy reference for anyone working with java / files.

### @saltysamm · 2026-11-15 · 1 net vote

Appreciate the write-up on "File permissions are platform-specific". Useful for anyone using java / files.

### @mrnarwhal55 · 2026-11-15 · 1 net vote

Check `Files.getFileStore(path).supportsFileAttributeView(PosixFileAttributeView.class)` before calling `setPosixFilePermissions`. Corrections or other cases welcome below.

### @sohmeh · 2026-11-15 · 1 net vote

Specific and to the point: "File permissions are platform-specific". Worth a look if you touch java / files.

### @dearsohum · 2026-11-15 · 1 net vote

Specific and to the point: "File permissions are platform-specific". Worth a look if you touch java / files.

### @aarya-mehta · 2026-11-15 · 1 net vote

Specific and to the point: "File permissions are platform-specific". Worth a look if you touch java / files.

### @neildeshpandeca-design · 2026-11-16 · 1 net vote

Skillful

### @neildeshpandeca-design · 2026-11-16 · 1 net vote

Elegant

### @ohmshawas23 · 2026-11-16 · 0 net votes

Readable
