Scheduled Grunt Task Fails to write to SMB Shared
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
We are running tasks (copy, delete) with Grunt contrib plugins. All the tasks run well when using the local dir on a server (windows server 2012). When running the tasks with shared folders (UNC/SMB), the tasks fails silently. No files are copied or deleted (contrib-copy,clean). Just reads traces are shown when using verbose output.
The scheduled task is executed from Windows Scheduler. The user context does not appear to load as grunt starts to run causing the lack of permissions to enable Grunt to manage the files. This happens with either mapped drives or UNC/SMB paths.
Executing the scheduled tasks using a cmd (.bat) enables the security context, and the files are copied/deleted. The difference is JavaScript vs Windows batch files.
Contributor guide
Research direction
Reproduce the scheduled execution on Windows Server 2012, comparing Windows Scheduler with the working .bat invocation. Inspect verbose traces from the contrib-copy and contrib-clean tasks for UNC/SMB and mapped-drive paths. Done means scheduled Grunt tasks successfully copy and delete files on the shared folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100