Laravel and Dropbox file permissions conflict - laravel

I'm running apache on my Mac and have a website folder in Dropbox so I can work from a few different machines. Laravel works if /app/storage is 775. If 750, Laravel doesn't work. However, with the permission at 775, Dropbox tries to sync and fails with an "access denied" error.
I tried enabling Dropbox selective sync and unchecked the app/storage folder but it removed it completely from my computer which obviously breaks Laravel.
How can I make Dropbox and Laravel friends again?

I was able to get Dropbox to ignore the folder by following these steps.
I ignored the sessions and views folders but I may have only needed to ignore the sessions folder. I am not sure.
The steps were:
Copy the /apps/storage/views and /apps/storage/sessions folders
to your desktop
Delete the originals in /apps/storage/views and
/apps/storage/sessions
Create empty view and session folders in /apps/storage/
Turn on selective sync via Dropbox and uncheck the
/apps/storage/views and /apps/storage/sessions
Both folders will be deleted by dropbox, re-add the copies you made
on your desktop.
Dropbox sync should not have any more conflicts and will now ignore files in views and sessions folders.

Related

Docker for Windows: No permissions over folders inside `C:\ProgramData\Docker`

I'm not sure since which version, but the permissions for the files and subfolders inside the C:\ProgramData\Docker folder have changed. I'm not able to display the current owner and I'm not able to delete the contents of the volumes anymore.
Below image shows the permissions over the plugins folder, but every file and folder inside C:\ProgramData\Docker is showing the same thing.
The current user is a member of the groups Administrators and docker-users.
Is this a known issue for anyone and is there a nice way to fix this?

Mac App Sandbox testing - how remove existing folder access permissions

I'm currently adding Sandboxing support to my app.
Having give permission to my app to access a folder (by dragging it onto my Window) and I would now like to revoke that permission so that I can retest what happens before that permission is given.
How can I do that?
I'm not yet using URL bookmarks, and yet the permission persists across restarts of the application. I don't know if this is because it's a folder rather than a file?
Before you change the permissions of file or folder, you must store the current one for later use. I have never seen a method or system-call to restore previous permissions after a change.

.svn/lock file access denied

I have got a SVN Server. Which worker perfect untill this morning (Last commit 10:35:39). There was a file created at the hidden .svn folder which is named "lock" at that commit time.
After the file was created I cannot COMMIT, UPDATE, CLEAN-UP and tried to login as Server admin. When I right click the file and select properties, the Security tab shows I do not have access to see the information. It is not possible to set myself as file admin. I can not delete the file.
Other checkout directories which also use the same SVN server still work.
Anyone knows how to delete this file or fix this issue?
I had a similar access denied issue when trying to move a repo from another server. I was able to load the repo by making sure I was the Owner of the target files

Eclipse workspace as htdocs in XAMPP not working in Mac?

I've bought a MacBook Air(I've been converted from a PC guy to a Mac) today and I have recently installed XAMPP and Eclipse for Mac and I try to set the workspace for Eclipse as the htdocs folder in XAMPP. I always get the warning:
Workspace in use or cannot be created, choose a different one!
The directory i try to set is /Applications/XAMPP/htdocs
I've been trying to set an another directory it works fine as long as it is not the one above. What have I done wrong? I want the directory above. Pls. help
The solution is this:
Go into the htdocs folder and hit CMD+I to bring up the "Get Info" window
In this window, go to the bottom right and click on the padlock icon, enter your password to unlock the permissions settings in the window
You'll see a list of users and their respective permissions. Change the "admin"'s permission to "Read & Write"
Click the padlock once more to save your changes and lock the permissions for the htdocs folder
Start up Eclipse and then select htdocs as your workspace, and
Voila! You're done.
Hope that helps.
It's likely a permissions issue. The application may not be requesting admin rights to write to (or in some way control) that directory, it may just be silently failing. Generally, you need to supply admin rights to modify anything under /Applications/.
I wouldn't recommend using /Applications/XAMPP/htdocs/ as your workspace anyway. Your workspace should either be in your home directory (Documents or perhaps even Library though the former would be more intuitive), or in some other shared location if multiple users need to access it. Bundling it with the application itself would risk losing the data during an application upgrade, or in some other way confusing the issue.
Why do you want your data in the /Applications/ directory?
The problem here is that this workspace is locked. The quick solution is to delete /Applications/XAMPP/htdocs/.metadata/.lock
The slightly longer solution is to try the following command whenever such a situation occurs:
find /Applications/XAMPP/htdocs -name "lock" -exec echo {} \;
This will show you any file in that directory that has lock in the name. Remember that hidden files start with a . (such as .lock or .metadata).
The even longer answer is that /Applications is outside of the userspace and should not be used for user documents (like code files). These should ideally be moved to somewhere in /Users or into a directory specifically created for this purpose (such as /home or /shared). I'm particularly fond of having a /Users/Shared directory for sharing files between accounts.

Delete queue in NTFS?

In my apps (VB6 and C# 2008) on Windows 2003 twice now I have seen similar behavior regarding deletion of folders containing files. My code will build some temporary folders and generates files in that folder for subsequent processing. Upon processing completion, my code will try to delete the generated temp folder. The delete operation completes without error.
However, upon further inspection, you can see that the folder still exists in windows explorer. Attempting to browse this folder results in a permission denied error. Later on the app will process another round of files and try to create the temp folder again. Unfortunately, the previous Pending Delete has not finished so trying to create the folder again results in permission denied error. The folder is not truly deleted until i close my app. As soon as the app is closed the folder gets deleted. Why are my folder delete operations not committed until the app is closed?
I wonder - is it possible you have accidentally retained a lock on that directory? that would explain why the directory cannot be removed until your app has departed.
There are some tools - try SysInternals - which will list file/directory locks. Try your app and then see if it retains a lock. I think you can then forcefully remove that lock - see then if the directory immediately disappears.

Resources