• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF9 - CFDIRECTORY returning blank

LEGEND ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

Hello, everyone.

I read (somewhere) that if CF is installed and run under a local account, then it cannot utilize CFDIRECTORY.

So I followed the instructions to add an account to my Win7 system for CF9, gave it administrator status, switched CF to run under this account, and restarted CF9 Application Server.

But CFDIRECTORY is still returning a blank object.  The path is correct (although C:/CF9/wwwroot looks odd to my MS conditioned eyes).

Any suggestions on how to get CFDIRECTORY to work?

^_^

Views

860

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

Not sure what "administrator status" is referring to, since there are multiple levels of admin capabilities.  Did you give it local admin or domain admin privs?  If it is a local admin, then it won't have access to directories on another server.  You will need to go to that server and specifically give that user access privs to the directories you want it to be able to read.

-reed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

Win7 Pro, standalone.  Admin permissions that go with being in the Administrator group.  Not trying to access directories of other servers, this is purely local.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

I've never had a problem with CF not being able to use CFDIRECTORY/etc tags for directories and files on the local machine, with the CF service running under the default service account (ie, no changes from how it was installed).  Did you try to use CFDIRECTORY before changing to the non-service account?  If not, give that a try - it will show whether the problem is with the permissions on the user you setup.

The forward slashes might look odd, but CFDIRECTORY doesn't care.

Can you show us the code that you are executing, and the output?

-reed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

I did try the CFDIRECTORY before creating a CF account, and they are both blank.  I'm just trying to figure out what could be causing a blank response.  The recurse attribute is set to "yes".

So I cannot conclusively state that the account is or is not making a difference - it's most likely something else, then.  But what else could prevent the directory list?

Unfortunately, I cannot copy/paste code, here, as my dev system is isolated from the internet, and I can't xfer code (no CD buring permission, and flash drives are proscribed.)

But I can manually enter relevant code (thankfully, it's not 1000 lines, or more.)

<cfdirectory action="list" directory="C:\CF9\wwwroot\" name="fileList" sort="dateLastModified, name, type" recurse="no">

<cfdirectory action="list" directory="C:/CF9/wwwroot/" name="fileList" sort="dateLastModified, name, type" recurse="no">

I've tried both of the above (both with the default account, and the account I created for CF9), followed by <cfdump var="#fileList#" expand="yes">, and both are returning empty objects.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

LATEST

And.. here's something..

This is the situation on my local CF server (which resides on my dev system).  If I push the same file to another CF server in our development environment, it works fine.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

The path looks odd to my eyes too.  It would look normal with backslashes instead of forward slashes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation