MFC CFTPConnection : How to reset the directory - visual-c++

I am facing issues with FTP folder resetting using the class CFTPConnection.
My development environment is VC++6.0 and MFC.
I am able to create subfolders in the FTP using the function "CreateDirectory" of CFTPConnection class (FTP Server is in RHEL using vsftpd package).
But not able to find the function to go back to the root folder or parent folder.
Kindly anyone help me to fix this issue.
Thanks and Regards,
Alvin

The method you want is CFtpConnection::SetCurrentDirectory which simply uses FtpSetCurrentDirectory to change the directory.
Since FtpSetCurrentDirectory accepts:
Pointer to a null-terminated string that contains the name of the
directory to become the current working directory. This can be either
a fully qualified path or a name relative to the current directory.
You should be able to navigate using relative paths like ".." to go back a folder or to reset to parent folder something like "/".

Related

Robot Framework cannot create folder via Create Folder keyword

I observe very strange situation my Robot Framework script cannot create folder via Create Directory keyword. Code is very simple
Create Directory folder_name
According to log step ends with success but actually folder is not created.
I use Robot Framework 3.2.2 on latest version of xubuntu. I suppose that something wrong with access to file system from script. But I cannot fond out where
Please use double slashes (//)
to separate the folders forming the path argument
("folder_name", as you've named it).
This notation is for Windows.
The idea can be explored from here on.

Drupal 8: How to use private file system for node

Scenario:
I want to create a field field and attach it to a content type and willing to store the uploaded file into private file system.
I am using Drupal 8.6, php 7.1 and linux
My default file system is public, but for that specific file field, I want to store it, into private folder. So I created a folder outside my document root folder e.g. /var/www/private and set that into settings.php.
The purpose of this field is that, to allow, certain logged in users to able to download and restrict other.
I googled a lot, there are lot of suggestions, none worked or pointed the issue I am facing. I set the file directory as "dcouments/[date:custom:Y]-[date:custom:m]".
Now when i trying to upload a file, it gives me error like, folder "documents/2018-09" can't be created and upload failed. Surely it seems permission issue, i gave "private" folder to "rwxrwxr-x" permission, but its not working. Strangely it works in windows system.
Could anyone suggest, how to fix that? Whats going wrong there?
thanks in advance!
Permissions you defined may just be fine. The problem maybe that the private folder doesn't belong to www-data neither to its group. Check the real owner of the folder and set it to www-data. This should do the trick.
What I actually find out that, the web-server don't have permission to create sub-directory in the private folder.

Shared files & virtual directory persmissions on IIS

getting myself in a twist here, trying to set up a directory on one website to store a number of files that need to be accessed as include files by a number of other websites in the same server (IIS).
I've created the directory on the main website, and then virtual directories on the other websites, all with paths set to that.
www.mainsite.com/cdn/test.asp ... opens OK
www.othersite.con/cdn/test.asp ... opens the test file on the mainsite as well
But when I try to use an include (virtual or file) it can't find the test file.
Using FileSystemObject / DirectoryExists function can locate the main cdn folder, mapping the path from the virtual folders.
But it doesn't recognise the file in that folder?
Any ideas on making this work... or suggestions for a better way to do it would be much appreciated!
Thanks
Matt

location of .arangosh.rc in windows

I try to create a .arangosh.rc file with the timed-function as documented in
https://docs.arangodb.com/Arangosh/Configuration.html
Unfortunately I did not find any hint, in which concrete directory I shall store the .rc file. I also tried to start arangosh with the --configuration, but this throws an error. When starting arangosh with --javascript.execute, it only executes the javascript and directly finishes afterwards.
Can anybody provide me a hint, please?
arangosh will look for a user-defined startup script named .arangosh.rc in the user's home directory on startup. If the file is present arangosh will execute the contents of this file inside the global scope.
On Linux, the directory name convention for the home directory is /home/<linux-user-name>
The location of the home directory on Windows may vary depending on settings. On the Windows I have access to, the Windows explorer shows a localized name of the directory (C:\Benutzer\<windows-user-name>) even though the file system's actual directory name is C:\Users\<windows-user-name>. ArangoDB will determine the home directory on Windows by peeking into the enviroment variables %HOMEDRIVE% and %HOMEPATH%.
Putting the .arangosh.rc file into C:\Users\<windows-user-name> worked for me when I tried. I put the timed function into it and could use it in arangosh afterwards.
If it doesn't work for you, could you post which Windows version you're using (and if possible also the name of the home directory so we can try to reproduce)? Thanks.

KohanaException : Directory APPPATH\cache must be writable

i am trying to run a project of kohana-3 in wamp server but getting following error
Kohana_Exception [ 0 ]: Directory APPPATH\cache must be writable
please help.
Previously this was working fine.
You must set your cache folder to be writable.
Bare in mind that usually in WAMP the PHP user is 'nobody' which doesn't have access to your folders, therefore you must set your folders to be writable.
Check whether the file actually exists (application/cache), this folder comes empty with Kohana, and some versioning systems and other software usually delete and ignore empty folders.
If it does not exist, create the folder and insert a blank file in it (ie, empty.txt) if the error persists, give the appropriate permissions.
Oh yeah, I read an answer from someone yesterday but I only figured it out today. What I did was this:
Go inside application/
Create a new folder cache/
Go inside cache/
Create a empty textfile. (I created empty.txt)
Then thats it. hope it helps

Resources