Search Results

Search found 576 results on 24 pages for 'symlink traversal'.

Page 1/24 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • File not updating in symlink'd folder in IIS

    - by Daniel Short
    I have the following setup: Site1/Shared/ - Physical folder Site2/Shared/ - symlink using mklink to Site1/Shared I've updated a javascript file in Site1/Shared/scripts, and the change is being reflected on Site1. However, the change is not being reflected through IIS on Site2. When I open Site1/Shared/scripts/common.js and Site2/Shared/scripts/common.js, they match exactly. But when I view the files through Safari, Firefox, Chrome, IE, from any machine (even machines that have never visited the sites), the change is not reflected on Site2. Here are URLs to the files to review: Site 1: http://www.landsofamerica.com/shared/scripts/common.js Site 2: http://www.landsoftexas.com/shared/scripts/common.js These files look exactly the same when logged onto the server, and the shared folder under landsoftexas.com is a symlink created using mklink to the shared folder under landsofamerica.com. Any idea what might be causing IIS to serve the wrong file?

    Read the article

  • Symlink across local volumes in webroot?

    - by geerlingguy
    I am looking for a good short-term solution to storage space concerns on my website. Currently, I have all uploaded files (flash video, images, etc.) inside the 'files' directory in my web root (/home/account/public_html/files). That directory is located on my high-speed main hard drive (a 15k SCSI drive). I have another drive with much more capacity, but spinning at 10k rpm (so still fast, but not as good for random reads/writes as the main drive. The entire drive is mounted at /backup Right now I'm just using it as a backup volume. I would like to create a symlink from my /home/account/public_html/files folder to /backup/files, and have all files reside on the second drive. However, if someone accesses a file at http://www.example.com/files/filename.jpg, would it still work if I symlinked to the second drive? (Basically, would Apache/PHP automatically know to follow the symlink for that directory?).

    Read the article

  • Check if a symlink has changed

    - by BCS
    I have a daemon that, when it's started, loads its data from a directory that happens to be a symlink. Periodically, new data is generated and the symlink updated. I want a bash script that will check if the current symlink is the same as the old one (that the daemon started with) and if not, restart the daemon. My current thought is: if [[ ! -e $old_dir || $(readlink "$data_dir") == $(readlink "$old_dir") ]]; then echo restart ... ln "$(readlink "$data_dir")" "$old_dir" -sf else echo no restart fi The abstract requirement is: each time the script runs, it needs to check if a symlink on a given path now points to a something other than it did the last time and if so do something. (The alternative would be to check if the data at the path has changed but I don't see that being any cleaner.) My questions: Is this a good approach? Does anyone have a better idea? Where should I put $old_dir?

    Read the article

  • How to symlink folders and exclude certain files

    - by Jarrod White
    Hey Guys, I'm not a server guru (unfortunately) but have a decent knowledge of linux & bsd. I'm trying to symlink multiple instances of HLDS (game server) but need to exclude certain folders & config files to achieve this properly. I need to do it this way as HLDS loads many mods automatically, and putting an exception to disable the mods doesnt work for all of them. so basically i want: /home/user/hlds-install (the base install) /home/user/server1 /home/user/server2 etc... and then be able to manually put any configs/mods ive excluded into the server dir's so that each server can be configured individually. Can anyone tell me how to do this, perhaps some sort of bash script so that I can just change the targets to run it each time i want to create a new one. I have quite a number to make so doing the whole thing manually for each one definately isn't an option and im all for working smarter, not harder! Thanks :)

    Read the article

  • Symlink - Permission Denied

    - by John Smith
    I'm facing an interesting problem with plenty of Permission Denied outputs when using SymLinks Linux: Slackware 13.1 Directory with Symlink: root@Tower:/var/lib# ls -lah drwxr-xr-x 8 root root 0 2012-12-02 20:09 ./ drwxr-xr-x 15 root root 0 2012-12-01 21:06 ../ lrwxrwxrwx 1 ntop ntop 21 2012-12-02 20:09 ntop - /mnt/user/media/ntop6/ Symlinked Directory: root@Tower:/mnt/user/media# ls -lah drwxrwx--- 1 nobody users 1.4K 2012-12-02 19:28 ./ drwxrwx--- 1 nobody users 128 2012-11-18 16:06 ../ drwxrwxrwx 1 ntop ntop 320 2012-12-02 20:22 ntop6/ What I have done: I have used chown -h ntop:ntop on the ntop directory in /var/lib Just to be sure, I have chmod 777 to both directories Permission denied actions: root@Tower:/var/lib# sudo -u ntop mkdir /var/lib/ntop/test mkdir: cannot create directory `/var/lib/ntop/test': Permission denied Any ideas?

    Read the article

  • PHP: Symlink in public_html cannot be accessed through browser

    - by Rachel
    I have tester.php file which I want to run on the browser and I have created symlink to it in my public_html folder, but still when I try to run it, its not working and gives me following error message. Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server error, please contact the webmaster. Error 403 web.upc03.dev.com Sun Apr 4 22:41:23 2010 Apache I am not sure as to why am I getting this error message, I have check all file permissions settings and it seems to be fine. My File permissions settings are: lrwxrwxrwx for tester.php Is there something that should be done other way or is this not the proper approach ?

    Read the article

  • table alias (or 'symlink') in mysql

    - by andreash
    Hi there, in MySQL5.1, is there a way to make one table accessible by two different names? I'm thinking about somethink like a symlink on linux filesystems. I know theres the CREATE VIEW myview AS SELECT * FrOM mytable thing, but I don't only need to SELECT from both names, but also delete etc ... You might ask why I want to do this? It's about getting a commercial, closed-source app to work, which is crappily programmed (usually, the table names are all lower-case, but occasionally, they use capitalized names for the same table ...). Oh, that would be another idea: Is there a way to tell MySQL not to care about capitalization of table names (like on Windows filesystems?)? that would also do the trick ... Thanks for your insight! A.

    Read the article

  • Preoder traversal of a Btree

    - by Phenom
    I'm trying to figure out how to do a preorder traversal of a Btree. I know that generally preorder traversal works like this: preorder(node) { print value in node preorder(left child) preorder(right child) } What's confusing to me is how to make this work with a Btree, since in each node there are multiple values and multiple child pointers. When printing values, do all the values in the node get printed before descending into the left child? Each node looks like this: child1 value1 child2 value2 child3 value3 child4 Also, why would anyone want to do a preorder traversal of a Btree, since an inorder traversal is what will display the values in ascending order?

    Read the article

  • How do implement a breadth first traversal?

    - by not looking for answer
    //This is what I have. I thought pre-order was the same and mixed it up with depth first! import java.util.LinkedList; import java.util.Queue; public class Exercise25_1 { public static void main(String[] args) { BinaryTree tree = new BinaryTree(new Integer[] {10, 5, 15, 12, 4, 8 }); System.out.print("\nInorder: "); tree.inorder(); System.out.print("\nPreorder: "); tree.preorder(); System.out.print("\nPostorder: "); tree.postorder(); //call the breadth method to test it System.out.print("\nBreadthFirst:"); tree.breadth(); } } class BinaryTree { private TreeNode root; /** Create a default binary tree */ public BinaryTree() { } /** Create a binary tree from an array of objects */ public BinaryTree(Object[] objects) { for (int i = 0; i < objects.length; i++) { insert(objects[i]); } } /** Search element o in this binary tree */ public boolean search(Object o) { return search(o, root); } public boolean search(Object o, TreeNode root) { if (root == null) { return false; } if (root.element.equals(o)) { return true; } else { return search(o, root.left) || search(o, root.right); } } /** Return the number of nodes in this binary tree */ public int size() { return size(root); } public int size(TreeNode root) { if (root == null) { return 0; } else { return 1 + size(root.left) + size(root.right); } } /** Return the depth of this binary tree. Depth is the * number of the nodes in the longest path of the tree */ public int depth() { return depth(root); } public int depth(TreeNode root) { if (root == null) { return 0; } else { return 1 + Math.max(depth(root.left), depth(root.right)); } } /** Insert element o into the binary tree * Return true if the element is inserted successfully */ public boolean insert(Object o) { if (root == null) { root = new TreeNode(o); // Create a new root } else { // Locate the parent node TreeNode parent = null; TreeNode current = root; while (current != null) { if (((Comparable)o).compareTo(current.element) < 0) { parent = current; current = current.left; } else if (((Comparable)o).compareTo(current.element) > 0) { parent = current; current = current.right; } else { return false; // Duplicate node not inserted } } // Create the new node and attach it to the parent node if (((Comparable)o).compareTo(parent.element) < 0) { parent.left = new TreeNode(o); } else { parent.right = new TreeNode(o); } } return true; // Element inserted } public void breadth() { breadth(root); } // Implement this method to produce a breadth first // search traversal public void breadth(TreeNode root){ if (root == null) return; System.out.print(root.element + " "); breadth(root.left); breadth(root.right); } /** Inorder traversal */ public void inorder() { inorder(root); } /** Inorder traversal from a subtree */ private void inorder(TreeNode root) { if (root == null) { return; } inorder(root.left); System.out.print(root.element + " "); inorder(root.right); } /** Postorder traversal */ public void postorder() { postorder(root); } /** Postorder traversal from a subtree */ private void postorder(TreeNode root) { if (root == null) { return; } postorder(root.left); postorder(root.right); System.out.print(root.element + " "); } /** Preorder traversal */ public void preorder() { preorder(root); } /** Preorder traversal from a subtree */ private void preorder(TreeNode root) { if (root == null) { return; } System.out.print(root.element + " "); preorder(root.left); preorder(root.right); } /** Inner class tree node */ private class TreeNode { Object element; TreeNode left; TreeNode right; public TreeNode(Object o) { element = o; } } }

    Read the article

  • VMWare/Ubuntu development stack with symlink to Windows 7

    - by wdhilliard
    I would like to use a vm ubuntu installation as my testing environment, but to ease workflow, I have symlinked /var/www to a windows share. Everything looks good when browsing files and the owner and group both are showing up as www-data, but I can not seem to get apache to respond with anything other than permission denied. Obviously there are still some permission issues between Windows 7 and Ubuntu, but I don't know where to go

    Read the article

  • In-order tree traversal

    - by Chris S
    I have the following text from an academic course I took a while ago about in-order traversal (they also call it pancaking) of a binary tree (not BST): In-order tree traversal Draw a line around the outside of the tree. Start to the left of the root, and go around the outside of the tree, to end up to the right of the root. Stay as close to the tree as possible, but do not cross the tree. (Think of the tree — its branches and nodes — as a solid barrier.) The order of the nodes is the order in which this line passes underneath them. If you are unsure as to when you go “underneath” a node, remember that a node “to the left” always comes first. Here's the example used (slightly different tree from below) However when I do a search on google, I get a conflicting definition. For example the wikipedia example: Inorder traversal sequence: A, B, C, D, E, F, G, H, I (leftchild,rootnode,right node) But according to (my understanding of) definition #1, this should be A, B, D, C, E, F, G, I, H Can anyone clarify which definition is correct? They might be both describing different traversal methods, but happen to be using the same name. I'm having trouble believing the peer-reviewed academic text is wrong, but can't be certain.

    Read the article

  • Help me understand Inorder Traversal without using recursion

    - by vito
    I am able to understand preorder traversal without using recursion, but I'm having a hard time with inorder traversal. I just don't seem to get it, perhaps, because I haven't understood the inner working of recursion. This is what I've tried so far: def traverseInorder(node): lifo = Lifo() lifo.push(node) while True: if node is None: break if node.left is not None: lifo.push(node.left) node = node.left continue prev = node while True: if node is None: break print node.value prev = node node = lifo.pop() node = prev if node.right is not None: lifo.push(node.right) node = node.right else: break The inner while-loop just doesn't feel right. Also, some of the elements are getting printed twice; may be I can solve this by checking if that node has been printed before, but that requires another variable, which, again, doesn't feel right. Where am I going wrong? I haven't tried postorder traversal, but I guess it's similar and I will face the same conceptual blockage there, too. Thanks for your time! P.S.: Definitions of Lifo and Node: class Node: def __init__(self, value, left=None, right=None): self.value = value self.left = left self.right = right class Lifo: def __init__(self): self.lifo = () def push(self, data): self.lifo = (data, self.lifo) def pop(self): if len(self.lifo) == 0: return None ret, self.lifo = self.lifo return ret

    Read the article

  • Find folders with specific name and no symlink pointing to them

    - by Stefan
    Hey guys, I'm trying to write a shell script under linux, which lists all folders (recursively) with a certain name and no symlink pointing to it. For example I have /home/htdocs/cust1/typo3_src-4.2.11 /home/htdocs/cust2/typo3_src-4.2.12 /home/htdocs/cust3/typo3_src-4.2.12 Now I want to go through all subdirectories of /home/htdocs and find those folders typo3_*, that are not pointed to from somewhere. Should be possible with a shellscript or a command, but I have no idea how. Thanks for you help Stefan

    Read the article

  • symlink for dbus headers

    - by DarenW
    Source code for something that won't compile has the line #include but in real life that header file is in /usr/include/dbus-1.0/ Similarsituation exists for the dbus-c++ package. Why doesn't Ubuntu provide a symlink /usr/include/dbus pointing to the dbus-1.0 directory? Is this an bug in the dbus package? If intended, what it the purpose? Is it a proper fix to add a symlink myself? (Changing the source is not practical - there are many files, and they need to match what other people have.) update: ok, I totally misunderstood the situation, though it still comes down to a problem I think should be solved by a symlink. The dbus directory referred to in the #include statement is a deeper level directory under /usr/include/dbus-1.0/. The real problem is that the file dbus-arch-deps.h appears to be missing, but is actually stored in the weird location /usr/lib/x86_64-linux-gnu/dbus-1.0/include/dbus/ so now - why doesn't ubuntu provide a symlink to this in /usr/include/dbus-1.0/dbus, or actually store it there?

    Read the article

  • aother option for modified preorder tree traversal algorithm

    - by poldo
    Hi, been searching for a while now and can't seem to find an alternative solution. I need the tree traversal algorithm in such a way that a node can have more than 1 parent, if it's possilbe (found a great article here: Storing Hierarchical Data in a Database). Are there any algorithms so that, starting from a root node, we can determine the sequence and dependencies of nodes (currently reading topological sorting)? thanks in advance!

    Read the article

  • How to move a symlink to the trash?

    - by neoneye
    I don't see any options for the FSPathMoveObjectToTrashSync() function for not following links. Here is what I have tried Create a link and a file [ 21:32:41 /tmp ] $ touch my_file [ 21:32:45 /tmp ] $ ln -s my_file my_link [ 21:32:52 /tmp ] $ la total 8 drwxrwxrwt 12 root wheel 408 17 Maj 21:32 . drwxr-xr-x@ 6 root wheel 204 9 Sep 2009 .. -rw-r--r-- 1 neoneye wheel 0 17 Maj 21:32 my_file lrwxr-xr-x 1 neoneye wheel 7 17 Maj 21:32 my_link -> my_file Move the link to the trash OSStatus status = FSPathMoveObjectToTrashSync( "/tmp/my_link", NULL, kFSFileOperationDefaultOptions ); NSLog(@"status: %i", (int)status); Output is status: 0 However the file got removed and not the link [ 21:32:55 /tmp ] $ la total 8 drwxrwxrwt 11 root wheel 374 17 Maj 21:33 . drwxr-xr-x@ 6 root wheel 204 9 Sep 2009 .. lrwxr-xr-x 1 neoneye wheel 7 17 Maj 21:32 my_link -> my_file [ 21:33:05 /tmp ] $ How can I move move symlinks to the trash? The Solution.. thanks to Rob Napier NSString* path = @"/tmp/my_link"; OSStatus status = 0; FSRef ref; status = FSPathMakeRefWithOptions( (const UInt8 *)[path fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &ref, NULL ); NSAssert((status == 0), @"failed to make FSRef"); status = FSMoveObjectToTrashSync( &ref, NULL, kFSFileOperationDefaultOptions ); NSLog(@"status: %i", (int)status);

    Read the article

  • BST Level Traversal

    - by Dalton Conley
    Ok, so I'm trying to do a level order traversal of a binary search tree and its not working. The code below makes sense to me, but that is probably because I've been looking at it forever and I've convinced myself that it should work. void BST<T>::levelByLevel(ostream &out) { Queue<BinNodePointer> q; BinNodePointer subtreeRoot; if(myRoot == NULL) return; q.enqueue(myRoot); while(!q.empty()) { subtreeRoot = q.front(); out << subtreeRoot->data << " "; q.dequeue(); if(subtreeRoot->left != NULL) q.enqueue(subtreeRoot->left); if(subtreeRoot->right != NULL) q.enqueue(subtreeRoot->right); } } Maybe you guys could point out what I'm doing wrong because, although I understand the concept of a binary search tree, I'm not 100% on all the ins and outs.

    Read the article

  • Using directory traversal attack to execute commands

    - by gAMBOOKa
    Is there a way to execute commands using directory traversal attacks? For instance, I access a server's etc/passwd file like this http://server.com/..%01/..%01/..%01//etc/passwd Is there a way to run a command instead? Like... http://server.com/..%01/..%01/..%01//ls ..... and get an output? EDIT: To be clear here, I've found the vuln in our company's server. I'm looking to raise the risk level (or bonus points for me) by proving that it may give an attacker complete access to the system

    Read the article

  • Java Binary Tree. Priting InOrder traversal

    - by user69514
    I am having some problems printing an inOrder traversal of my binary tree. Even after inserting many items into the tree it's only printing 3 items. public class BinaryTree { private TreeNode root; private int size; public BinaryTree(){ this.size = 0; } public boolean insert(TreeNode node){ if( root == null) root = node; else{ TreeNode parent = null; TreeNode current = root; while( current != null){ if( node.getData().getValue().compareTo(current.getData().getValue()) <0){ parent = current; current = current.getLeft(); } else if( node.getData().getValue().compareTo(current.getData().getValue()) >0){ parent = current; current = current.getRight(); } else return false; if(node.getData().getValue().compareTo(parent.getData().getValue()) < 0) parent.setLeft(node); else parent.setRight(node); } } size++; return true; } /** * */ public void inOrder(){ inOrder(root); } private void inOrder(TreeNode root){ if( root.getLeft() !=null) this.inOrder(root.getLeft()); System.out.println(root.getData().getValue()); if( root.getRight() != null) this.inOrder(root.getRight()); } }

    Read the article

  • Exploiting Path Traversal Vulnerability

    - by Maputo
    I have a Java Web App running on Tomcat on which I'm supposed to exploit Path traversal vulnerability. There is a section (in the App) at which I can upload a .zip file, which gets extracted in the server's /tmp directory. The content of the .zip file is not being checked, so basically I could put anything in it. I tried putting a .jsp file in it and it extracts perfectly. My problem is that I don't know how to reach this file as a "normal" user from browser. I tried entering ../../../tmp/somepage.jsp in the address bar, but Tomcat just strips the ../ and gives me http://localhost:8080/tmp/ resource not available. Ideal would be if I could somehow rename the somepage.jsp so that it gets extracted in the web directory of the Web App. But then, the Linux filesystem disallows slashes in filenames (e.g. ../../home/webapp/somepage.jsp). Are there maybe any escape sequences that would translate to / after extracting? Any ideas would be highly appreciated. Note: This is a school project in a Security course where I'm supposed to locate vulnerabilities and correct them. Not trying to harm anyone...

    Read the article

  • UDEV: how to match SYMLINK during remove event?

    - by Magicloud
    I am using libusb to contact with a printer. And I am writing a rule for udev to remove the printer when it is disconnected. I use symlink to indicate the device. But when removing, the rule is not triggered. What should I do? ATTRS{manufacturer}=="Zebra Technologies", ACTION=="add", RUN+="/usr/local/bin/reinitZebra.sh", SYMLINK+="usblp%k" SYMLINK=="usblp%k", ACTION=="remove", RUN+="/usr/local/bin/reinitZebra.sh"

    Read the article

  • How to find the filename of a script being run when it is executed from a symlink on linux

    - by Phil Boltt
    Hi, If I have a python script that is executed via a symlink, is there a way that I can find the path to the script rather than the symlink? I've tried using the methods suggested in this question, but they always return the path to the symlink, not the script. For example, when this is saved as my "/usr/home/philboltt/scripts/test.py" : #!/usr/bin/python import sys print sys.argv[0] print __file__ and I then create this symlink ln -s /usr/home/philboltt/scripts/test.py /usr/home/philboltt/test and execute the script using /usr/home/philboltt/test I get the following output: /usr/home/philboltt/test /usr/home/philboltt/test Thanks! Phil

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >