Unable to list folders when using scoped app permission for Dropbox - dropbox

I'm able to successfully list folder and contents when my dropbox developer app has full access, however, when I'm using scoped access only to a specific folder, it fails.
Now when I switch to scoped access to a specific folder I'm running into errors. This request should fail since the app does not have access to the folder.
Now when I put in the right folder path, I'm still getting the same error.
For reference I'm sharing my app details

It looks like you're using the App Folder permission. This will root all your paths relative to that app folder; your app will not be able to see outside of it.
For example, if the user sees the file as "/Apps/AppFolderAccess/myfile.txt", your app will see it as "/myfile.txt". By setting your path to /Apps/AppFolderAccess, it is effectively resolving as /Apps/AppFolderAccess/Apps/AppFolderAccess - which is not found.
If your application needs to see content outside its app folder, you should select full access.

Building on top of the other answer: you need to set the application permission to access type "Full Dropbox– Access to all files and folders in a user's Dropbox."
However, note that this requires you to delete your existing app and create a new one since it is not possible to change the scope of an existing app.

Related

Copy files to local drive that requires different credentials

I've seen a lot of answers on copying files that use code to set a network share, with credentials, to copy to somewhere else. However I need a solution that will allow a user to copy from a network share they already have access for, to a local drive they don't have access to.
We run RDS servers and have locked down direct access to the local C:/ drive on the servers. We have been given a 3rd party program that needs to read data files that must be stored in a fixed path on the C:/ drive. These data files are updated once a month. Our users have read access but we do not want to give them direct write access to the root C:/ drive.
I need to write a piece of vb.net, or command line code in .bat file that will copy files to the Local C:/ whilst providing the details of a service account to provide the access.
As mentioned I've seen a lot about setting up a mapping to shared folder and passing creds, however we don't want to set the C:/ as mapped shared drive in this instance.
You don't want the user having access to the C Drive in general, is there any particular reason the permissions on the particular subfolder the files are going to can't have overriding permissions to allow writing to just that folder?
If that will not work, first thought that comes to mind is having a helper program that can be ran under a different user that does have that access. Set up an intermediate folder the user can write to, the program that they can launch drops the files into a folder they have access to. Helper program watches for files in the intermediate folder, moves them to where they need to be.
Set up would need to include adding a user that does have access to both locations, and then adding to task manager to launch the helper program under that other user at login.

Flow not displaying onedrive for business files

I am trying to create a flow that links files on my company's onedrive for business account with our SharePoint site. The first time I tried this, when I clicked the bar beside "*Folder", it listed the folders on my onedrive account and I was able to select the one wanted to create the flow between.
View Creating Flow:
However. A week later, I resolved an unrelated issue with the process and tried to create a new flow, but now, when I try to click the bar, this is all I get. Root is not a file on my onedrive, and it doesn't expand into anything. I have tried, putting in, "/File Name", but it won't recognize the file name, and the flow fails when I test it. I am not sure what I am doing differently this time that is causing Flow not to recognize the onedrive folders.
There is no folder, "root" in my one drive, and root doesn't expand into anything:
Root means the primary (main) OneDrive folder. If you click on the > next to root, it will open up the primary OneDrive folder and list all of the subfolders, as well as, all of the documents in the root folder.

Rails/Paperclip - Can't see uploaded images

I have a Rails 3 application which has an attachment model and uses Paperclip gem. Everything works fine on development environment but on production server we cannot access any of the images uploaded. The images are in the right folder where they are supposed to be but when I try to reach them on browser I simply get the 404 page.
The upload folder is located under public folder and called "uploads"
I can access this: "app_url/uploads/test.html" which I manually created to see if it works
But I cannot acces this: "app_url/uploads/test.jpg" which I upload within the application via Paperclip.
I can guess this has something to do with the server configuration but I'm not an expert and may need help about it.
Thanks
UPDATE
I've just realised that uploaded files belong to "nobody" and when I manually change the owner to "root" it seems to be working fine. So I need to find a way to tell Paperclip make the files belong to "root"
It's not a good idea to have a web application being able to write files as root. File permissions are derived from the process writing the files. In case you're using Passenger, there's the concept of user switching:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultUser
Upon startup of your app, Passenger tries to figure out which user owns those files, and tries to switch it's application process to that user. In case it fails, "nobody" is the default.
Check your application permissions on the file level. You should have one user account per application on your server. The application (the directory and contents above the public directory) should be owned by this user. Files under public should be readable by others, so the webserver can pick them up, too.
Are you using Capistrano for deployment?

Accessing Network shared paths in WinRT

Is there a way to access arbitrary network shared paths and read their content in WinRT? Programatically I want to read from the network shared paths in a WinRT App. I am getting an Access Denied error.
I was told that it might be possible to access the network shared path using file picker provided the app request for permission.
But in my case I do not have access to the file picker. Instead while parsing my model if there is path, I need to read the contents from that path. If that path is network shared path, it fails.
You won't be able to access arbitrary files without the user's explicit permission (via the File Picker).
Some well-known locations like the music and pictures library can be read if the application's manifest includes the associated Declaration, but beyond that all the application can access without the user granting permission (at least once) is its local application data storage.
Have a look at this question: Windows 8 Metro App File Share Access
You may be able to work around this limitation by using a Web Service that has access to the file shares. ;)

how to change folder permission in cms made simple

im working with cms made simple.my problem is my template folder permission.in this cms when a template uploaded,a folder (by the same name of that temlate,for example : 'TEMP1') creates and it's permission is set to 0755.when i want to change permission of the template folder i will get this error :
FileOp Failure on: /home/visamast/public_html/uploads/arty1: Operation not permitted
and also when i want to upload files via ftp or cpanel to this folder nothing will happen,i mean the upload process will be done,but no files has been uploaded!!!!!!!!
how can i fix this problem?!
It sound like you are having an ownership problem rather than a permission problem. If your server is set up to run PHP as a module, files and directories created by PHP will be owned by the generic Apache user. Generally that means that you will not be able to change permissions on the file/directory. Most likely you will need to have your hosting company do a recursive chown on the entire directory tree your site is in to make you the owner of all of the files and directories.