SShortSingh.
Back to feed

Five chmod Permission Traps That Catch Developers Out

0
·6 views

Standard tutorials recommend chmod 755 and 644 without explaining the permissions they grant. On directories, the read, write and execute bits behave differently: read lists names, write creates or deletes entries, and execute allows traversal, so a directory set to 666 is readable but unusable. The author also highlights confusion around chmod's = and + operators, the capital X flag for applying execute only where appropriate, and how umask is applied. Misplaced digits can unintentionally set setuid or setgid bits, while redirected file creation can yield overly permissive modes such as 644 for SSH keys. The article recommends install -m 600 for sensitive files and suggests a chmod calculator for verifying modes.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Loop order alone makes a 4096x4096 grid sum 13x slower due to CPU cache misses

A DEV Community author compared two functions that sum the same 4096 by 4096 grid, differing only in whether the outer loop walks rows or columns. Row-order summing took about 11 ms on an Apple M3 laptop, while column-order summing took about 146 ms, roughly 13 times slower. The explanation is that the CPU loads memory in fixed-size cache lines, so reading neighboring elements in a row reuses cached data, while jumping between rows in a column forces a memory fetch on nearly every read. The gap appears once the grid exceeds the cache size, and the author notes that a Float64Array shows the same pattern, indicating the cause is memory layout rather than JavaScript arrays. Suggested fixes include keeping the row loop outermost and accumulating column totals in a separate array, which matched the results of the column-order method at about 12 ms.

0
ProgrammingDEV Community ·

A job offer on LinkedIn came with malware in a Git hook. It's the "Contagious Interview" playbook

A recruiter messaged me on LinkedIn about building the website for a blockchain basketball game. Then they sent a documentation pack as a .tar.gz file. The plan was simple: review the docs, sign the NDA, then we'd schedule a call. The docs were real enough to read. The archive also held a Git hook that would have downloaded a script and run it on my Mac the first time I checked out a branch.

0
ProgrammingDEV Community ·

Apple's HALO Humanoid Hits 91% Task Success Using Qwen Model

Apple disclosed its HALO humanoid system, which calls Alibaba's Qwen model on a Unitree G1 robot and averages 91% success per task. Separately, GitHub reportedly tested 5,000 AI agents collaborating inside a single repository while handling 7,200 pushes per second. Sam Altman argued at Stanford that an affordable token budget can now substitute for work once requiring around 100 top engineers. A study of ChatGPT Deep Research found that blunter prompt tones yielded higher accuracy on multiple-choice questions, with the overly polite phrasing performing worst. The report also highlighted that compute costs and pricing are increasingly shaping which AI tools deliver value.

0
ProgrammingDEV Community ·

osFoundry Operator 讓 AI 代理在桌面 App 內操作,並記錄每一步動作

osFoundry 是一款將聊天、代理、檔案與工具整合於同一視窗的桌面應用程式,其 Operator 功能讓 AI 代理在對話旁的即時窗格中工作。使用者詢問哪些 GPU endpoint 仍在計費時,代理會直接開啟對應畫面讀取資訊並回覆,同時提議停止運作中的 endpoint,但會在執行前先詢問。窗格下方的 Log 會逐筆列出代理的每個動作,並可複製成報告或清空,讓使用者能核對而非只能相信代理的自述。此外,Setup 清單會依 App 實際狀態顯示設定進度,API 金鑰則由使用者自行在設定對話框輸入。內建瀏覽器也提供頁面讀取、摘要與連結擷取等輔助功能。