This is a google spreadsheet script question.
I have a GUI setup in order to search for "SouthWest" and then find a "test" sheet. This is the code I am using.
var file = DocsList.getFolder("SouthWest").find("test");
This works just fine when I run it under my account (as I have this folder and file setup correctly) but when another user is logged into google docs it will attempt to search for this folder/file under the new user instead of the owner of the document. Is there a way to have it just search the DocsList of the owner of the spreadsheet that is currently open? The error that I get under the new user is "Error encountered: Cannot find folder SouthWest." Thanks.
If you always want to access the same file, you can use the getFileById method and address it directly instead of searching every time:
https://developers.google.com/apps-script/class_docslist#getFileById
Of course, you should make sure that all users are allowed to access that file.
Related
I'm setting up a new share that I've enabled enumerated access on. I'm looking to limit people access to files on a certain folder. I've setup other folders that restrict access unless your in a security group. This folder thats giving me trouble was copied over from another network share. When I create a folder from scratch everything works fine so I'm curious if thats whats giving me issues.
The folder I'm trying to access is
x:/Limerock/Projects/"Project Name"
If I go into the security tab and check my effective access it says that I have full control:
The user I'm signed into is joe.jankowiak which is part of the Domain Admins security group. Domain Admins owns all the folders in above this and has full control.
When trying to enter the folder it tells me I need to request permission. I'm an admin so it goes through and adds "joe.jankowiak" to the full control list in the security permissions.
Why is it not taking my domain admin credentials to enter this folder? I'm seeing other weird behavior such as it saying "Unable to display current owner." and "You must have read permissions to view the properties of this object". Clicking continue lets me see it.
Everything looks right, I've setup 6 other new folders in the exact same manner and they work fine. I've signed in and out many times but it hasn't fixed it. Weird enough, another computer I signed into lets me access the folder just fine. Is there a way to reload file permissions since logging in/out doesn't seem to do it. Is there a command like gpupdate that I should run?
I have seen this before andyou might need to do the following operations in order:
-Replace Ownership on the folder and replace all child object ownership too=>apply or OK
-Close the security properties and re-open it again
-Add Domain Admins as full control and Replace all child object permissions... =>apply/OK
That should do it
I'm trying to access a file in a Google Drive directory but linking to it using the File Id provided by the API it says that i don't have permission. What i saw is that the File Id in the URL is different from the one who returns from the API. Why?
Using the test page of the Google Api it returns a "Not Found" error(404) and not the "No Permissions" error. Anybody knows how to get this ID(same of the url) that links to the file instead of the File's ID
Edit: Found that the File Resource has a property called "webViewLink" is it the link to the file instead of using the ID?
When you are trying the Drive API, you can set using fields property what values you want to return from your call as it is shown in this image:
webViewLink will return you the link that's shown when you open the file in your browser.
id will return you the ID of the file.
I specified some values, but you can see HERE all the values you could use and if you put "*" you will return all of them. Also, I didn't show in the image the id of the file to not share that info.
HERE you can see why you are getting that error. Surely, you don't have enough permitions because you have already checked that it exists for what I understood in your question.
I have created two refresh tokens for me:
one for
SCOPE = 'https://www.googleapis.com/auth/drive'
and another
SCOPE = 'https://www.googleapis.com/auth/drive.file'
I'm trying to get information about files (using get method)
Some files I can get when using SCOPE drive.files, and some only when using wider scope drive
But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder.
The difference is that 'drive.file' only gives you permission to files that your app has created or the user has explicitly shared with your app, whereas 'drive' gives your app permission to see the all the files in the user's drive.
See
https://developers.google.com/drive/web/scopes
You should really look into using drive.file, that is where they are trying to push users. I was just fighting with this myself and found that if you use the drive.file scope, you can then subsequently open the file that is chosen using the API for the file type, but only if you set the correct AppID.
See here: https://developers.google.com/picker/docs/#gdata
This allows you to get past the 404 error that you get if you don't set the AppID.
I was playing around with hwi, I got it started.Now I can see the different schemas which are present. But I don't know how to query them. I tried to check hive wiki (https://cwiki.apache.org/confluence/display/Hive/HiveWebInterface) but they dont seem to have much information put over there. There seems to be a Running a query section in Walk through but it says image not found.
Anybody who has used HWI to query please suggest a way to use it.
Try these steps :
Open HWI : http://localhost:9999/hwi/index.jsp
Click on Authorize in the left pane. This will open the Change User Info section. Enter the username and hit submit to complete the authorization process. Upon successful authorization you'll see Authorization is complete at the top of your page.
Now click on Create Session, enter some session name and hit Submit.
Once you submit the session name you'll get the Manage Session screen. This is the place where all the action will take place. Come down to the Session Details section and enter a file name, say /Users/tariq/res.txt, in the Result File box. This is the file where the result of your query will get stored. If you expect your result to be very huge you can just enter /dev/null over there. Remember the result file is local to the web server. Similarly enter the error file if you wish.
Now come down to the Query box and write the query you want to execute.
Come down further to the Start Query drop down list, click on it and elect YES and hit Submit.
You should be able to see the file /Users/tariq/res.txt by now containing the result of your query. You can also view the result by clicking on View File option which will appear next to the Result File box upon the successful completion of your query.
HTH
Take a look at Hue - http://cloudera.github.io/hue/
This project is bundled with the Cloudera installation and seems to work rather well.
Best,
Sukrit
I'm a windows 7 user and I want to access an object from within my public dropbox folder using the command line. How do I do that (note my skills with the command line are weak so be gentle please. This is what I'm basing my information on: DROPBOX CITE LINK
Here's the path to my drop box and what I attempted:
#the path
C:/Users/trinker/Dropbox/Public/plot.png
#the attempt to retrieve the url of plot.png
CD C:/Users/trinker/Dropbox/Public/
C:/Users/trinker/Dropbox/bin/dropbox.py puburl C:/Users/trinker/Dropbox/Public/plot.png
Note my slashes are going the opposite way you'd normally see them on a windows machine as I'm using this within another program that requires the slashes be in this direction or doubled as in \\
The goal is to retrieve the url for the dropbox object.
There is a work around pointed out to me by my friend Dason. Go to your public folder and copy the link from a file. Here's one of mine:
https://dl.dropboxusercontent.com/u/61803503/%20wordcloud.pdf
The account number is always the same for your own drop box. So the following form will allow me to share documents:
file.path("https://dl.dropboxusercontent.com/u/61803503", DOCUMENT_NAME_HERE)
I don't know exactly what you are doing but if that is the url to your dropbox share, and you just wanted to access via command line have you tried just mapping a network drive to that URL to see if it works?