Storing Files in Linux

Hi all,

First of all, sorry that I am not familiar with Linux file system. I have a web app that allows users to save files (normally images). Now I saved them in MySql BLOB but I would like to save them to file path instead which makes backup easier. How can I create folders in Linux? Do I have to login to samba first? I tried but it doesn’t work:

dim f as FolderItem = SpecialFolder.CurrentWorkingDirectory.child("Images")

if not f.exists then
end if

What if I do not want to save in the working directory but another volume? say another machine that is dedicated for file storage?

Thanks in advance.


You can refer to the folder by his path:

Dim f As FolderItem
f = New FolderItem("/home/shr/images", FolderItem.PathTypeShell)
if not f.exists then
end if

Look at the folderitem constructors here:

You (your app) need to have sufficient permissions to the folder (and his parent to createAsFolder).

Excuse me, do I have to login samba within the app or should I assign accessible rights for the app in Linux?

You should assign access rights for your app.
If the user that starts your app has access to the samba drive, your app also will.

Thanks guys, will have a try.